1 # $Id: 27-logging.t,v 1.1 2005-12-21 16:58:36 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", 8192);
17 check_level("none,-warn", 0);
18 check_level("", 2077);
19 check_level("-warn", 2073);
20 check_level("zoom", 10269);
21 check_level("none,zoom,fruit", 24576);
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.