1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl 27-logging.t'
6 use Test::More tests => 11;
8 BEGIN { use_ok('ZOOM') };
10 check_level("none", 0);
11 check_level("none,debug", 2);
12 check_level("none,warn", 4);
13 check_level("none,warn,debug", 6);
14 check_level("none,zoom", 16384);
15 check_level("none,-warn", 0);
16 check_level("", 2077);
17 check_level("-warn", 2073);
18 check_level("zoom", 18461);
19 check_level("none,zoom,fruit", 49152);
22 my($str, $expect) = @_;
23 my $level = ZOOM::Log::mask_str($str);
24 ok($level == $expect, "log-level for '$str' ($level, expected $expect)");
27 # See comment in "17-logging.t" on incompleteness of test-suite.