#!/usr/bin/perl -w
use strict;
-use Test::More tests => 6;
-use Test::Exception;
use blib;
-use Data::Dump qw/dump/;
-use Cwd qw/abs_path/;
+use Test::More tests => 7;
BEGIN {
+use_ok( 'WebPAC::Test' );
use_ok( 'WebPAC::Common' );
}
-my $debug = shift @ARGV;
-
-ok(my $abs_path = abs_path($0), "abs_path");
-$abs_path =~ s#/[^/]*$#/#;
-
my $path = "$abs_path/conf/test.yml";
my $common = 'WebPAC::Common';
throws_ok { $common->fill_in( '$foo', bar => 42 ) } qr/unknown var/, 'fill_in no variable';
cmp_ok( $common->fill_in( 'foo = $foo bar = $bar', foo => 42, bar => 1 ), 'eq', 'foo = 42 bar = 1', 'fill_in' );
+like $common->var_path( qw/foo bar baz/ ), qr/var.foo.bar.baz/, 'var_path';