Revision b56d9999
Von Sven Schöling vor fast 11 Jahren hinzugefügt
t/Support/CanonialGlobals.pm | ||
---|---|---|
package Support::CanonialGlobals;
|
||
|
||
my @globals = qw(
|
||
our @globals = qw(
|
||
$::lxdebug
|
||
$::auth
|
||
%::myconfig
|
t/structure/globals.t | ||
---|---|---|
my (@globals, $testcount);
|
||
|
||
BEGIN {
|
||
@globals = map { s/[^a-z_]//; $_ } @Support::CanonialGlobals::globals;
|
||
@globals = map { s/[^a-z_]//g; $_ } @Support::CanonialGlobals::globals;
|
||
$testcount = scalar(@Support::Files::testitems);
|
||
}
|
||
|
||
|
||
use Test::More tests => $testcount;
|
||
|
||
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
|
||
... | ... | |
if ($found_word) {
|
||
ok(0,"$file: found UNREGISTERED GLOBAL $found_word --WARNING");
|
||
} else {
|
||
ok(1,"$file does only contain registered globals");
|
||
ok(1,$file);
|
||
}
|
||
} else {
|
||
ok(0,"could not open $file for globals check --WARNING");
|
Auch abrufbar als: Unified diff
t/structure/globals: Lexikalische Variablen sind schwer exportierbar.