6 use Test::More tests => 7;
9 use_ok( 'WebPAC::Test' );
10 use_ok( 'WebPAC::Common' );
13 my $path = "$abs_path/conf/test.yml";
15 my $common = 'WebPAC::Common';
17 cmp_ok( $common->fmt_time( 123456 ), 'eq', '10h17:36', 'fmt_time' );
19 throws_ok { $common->fill_in() } qr/no format/, 'fill_in without format';
20 throws_ok { $common->fill_in( '$foo', bar => 42 ) } qr/unknown var/, 'fill_in no variable';
21 cmp_ok( $common->fill_in( 'foo = $foo bar = $bar', foo => 42, bar => 1 ), 'eq', 'foo = 42 bar = 1', 'fill_in' );
23 like $common->var_path( qw/foo bar baz/ ), qr/var.foo.bar.baz/, 'var_path';