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