From b56d9999d5b0be050f66feab190bc765e8ef46ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 27 May 2014 17:22:10 +0200 Subject: [PATCH] t/structure/globals: Lexikalische Variablen sind schwer exportierbar. --- t/Support/CanonialGlobals.pm | 2 +- t/structure/globals.t | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/t/Support/CanonialGlobals.pm b/t/Support/CanonialGlobals.pm index 0dec37fde..656b8889d 100644 --- a/t/Support/CanonialGlobals.pm +++ b/t/Support/CanonialGlobals.pm @@ -1,6 +1,6 @@ package Support::CanonialGlobals; -my @globals = qw( +our @globals = qw( $::lxdebug $::auth %::myconfig diff --git a/t/structure/globals.t b/t/structure/globals.t index dca7369d5..10fd0393e 100644 --- a/t/structure/globals.t +++ b/t/structure/globals.t @@ -8,10 +8,11 @@ use Support::CanonialGlobals (); 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. @@ -53,7 +54,7 @@ foreach my $file (@testitems) { 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"); -- 2.20.1