/[webpac2]/trunk/t/0-common.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/0-common.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 886 by dpavlin, Sun May 27 16:00:26 2007 UTC revision 887 by dpavlin, Mon Sep 3 15:26:46 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use strict;  use strict;
4  use Test::More tests => 6;  use Test::More tests => 7;
5  use Test::Exception;  use Test::Exception;
6  use blib;  use blib;
7    
# Line 15  use_ok( 'WebPAC::Common' ); Line 15  use_ok( 'WebPAC::Common' );
15  my $debug = shift @ARGV;  my $debug = shift @ARGV;
16    
17  ok(my $abs_path = abs_path($0), "abs_path");  ok(my $abs_path = abs_path($0), "abs_path");
18  $abs_path =~ s#/[^/]*$#/#;  $abs_path =~ s#/[^/]*$#/#;      #
19    
20  my $path = "$abs_path/conf/test.yml";  my $path = "$abs_path/conf/test.yml";
21    
# Line 27  throws_ok { $common->fill_in() } qr/no f Line 27  throws_ok { $common->fill_in() } qr/no f
27  throws_ok { $common->fill_in( '$foo', bar => 42 ) } qr/unknown var/, 'fill_in no variable';  throws_ok { $common->fill_in( '$foo', bar => 42 ) } qr/unknown var/, 'fill_in no variable';
28  cmp_ok( $common->fill_in( 'foo = $foo bar = $bar', foo => 42, bar => 1 ), 'eq', 'foo = 42 bar = 1', 'fill_in' );  cmp_ok( $common->fill_in( 'foo = $foo bar = $bar', foo => 42, bar => 1 ), 'eq', 'foo = 42 bar = 1', 'fill_in' );
29    
30    like $common->var_path( qw/foo bar baz/ ), qr/var.foo.bar.baz/, 'var_path';

Legend:
Removed from v.886  
changed lines
  Added in v.887

  ViewVC Help
Powered by ViewVC 1.1.26