From: Sven Schöling Date: Thu, 20 Jun 2013 16:40:54 +0000 (+0200) Subject: globale Variablen in ein Helfermodul ausgelagert X-Git-Tag: release-3.1.0beta1~297 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cc849a74f2a5ff51b8a0f8224f2cadc2f63acd56;p=kivitendo-erp.git globale Variablen in ein Helfermodul ausgelagert --- diff --git a/t/001compile.t b/t/001compile.t index 6b814abfc..5289a2d28 100644 --- a/t/001compile.t +++ b/t/001compile.t @@ -74,10 +74,7 @@ foreach my $file (@testitems) { if (-l $file) { ok(1, "$file is a symlink"); } else { - local $TODO; - $TODO = 'schema updates are not required to be strict now' if $file =~ m{^sql/Pg-upgrade2}; - - my $command = "$perlapp -c$T -I modules/fallback -I modules/override $file 2>&1"; + my $command = "$perlapp -w -c$T -Imodules/fallback -Imodules/override -It -MSupport::CanonialGlobals $file 2>&1"; my $loginfo=`$command`; if ($loginfo =~ /syntax ok$/im) { diff --git a/t/Support/CanonialGlobals.pm b/t/Support/CanonialGlobals.pm new file mode 100644 index 000000000..0dec37fde --- /dev/null +++ b/t/Support/CanonialGlobals.pm @@ -0,0 +1,17 @@ +package Support::CanonialGlobals; + +my @globals = qw( + $::lxdebug + $::auth + %::myconfig + $::form + %::lx_office_conf + $::locale + $::dispatcher + $::instance_conf + %::request +); + +sub import { + eval "$_" for @globals; +} diff --git a/t/structure/globals.t b/t/structure/globals.t index 0a04c6f6f..dca7369d5 100644 --- a/t/structure/globals.t +++ b/t/structure/globals.t @@ -3,11 +3,12 @@ use strict; use lib 't'; use Support::Files; +use Support::CanonialGlobals (); my (@globals, $testcount); BEGIN { - @globals = qw(lxdebug auth myconfig form lx_office_conf locale dispatcher instance_conf request); + @globals = map { s/[^a-z_]//; $_ } @Support::CanonialGlobals::globals; $testcount = scalar(@Support::Files::testitems); }