File Coverage

File:t/Debug.t
Coverage:89.2%

linestmtbrancondsubtimecode
1#!/usr/bin/perl
2
3
1
1
1
1.3328352382563e+15
21
45
use strict;
4
1
1
1
22
18
55
use warnings;
5
6
1
1
1
241
18575
67
use Test::More tests => 5;
7
8
1
1
1
1549
34
152
use vars qw($debug $cgi_debug);
9
10BEGIN {
11
1
37
$ENV{'KOHA_CGI_DEBUG'}='2';
12
1
32
$ENV{'KOHA_DEBUG'}='5';
13
1
38
        diag "BEFORE use: \$debug is " . (defined $debug ? $debug : 'not defined');
14
1
371
        diag "BEFORE use: \$cgi_debug is " . (defined $cgi_debug ? $cgi_debug : 'not defined');
15
1
272
        use_ok('C4::Debug');
16}
17
18
1
183939
diag " AFTER use: \$debug is " . (defined $debug ? $debug : 'not defined');
19
1
678
diag " AFTER use: \$cgi_debug is " . (defined $cgi_debug ? $cgi_debug : 'not defined');
20
1
257
ok(defined $debug, " \$debug defined and imported.");
21
1
688
ok(defined $cgi_debug, "\$cgi_debug defined and imported.");
22
1
539
is($cgi_debug,2,"cgi_debug gets the ENV{'KOHA_CGI_DEBUG'}");
23
1
747
is($debug,5,"debug gets the ENV{'KOHA_DEBUG'}");
24
25
1
549
diag "Done.";