X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fstructure%2Fglobals.t;h=10fd0393e1d644f297225fabd177ee76fd420da4;hb=d6fed9b55a11dca1cfd9cd6f43940a945533d318;hp=0a04c6f6f4a3449aa61662d89e70c434574cfc51;hpb=5494f687372570c9d1c5eb5c6aad73767e50820a;p=kivitendo-erp.git diff --git a/t/structure/globals.t b/t/structure/globals.t index 0a04c6f6f..10fd0393e 100644 --- a/t/structure/globals.t +++ b/t/structure/globals.t @@ -3,14 +3,16 @@ 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_]//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. @@ -52,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");