/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (hide annotations)
Thu Nov 1 00:16:48 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: application/x-troff
File size: 633 byte(s)
 r1433@llin:  dpavlin | 2007-10-31 22:48:02 +0100
 HUGE swiping changes to implement new testing architecture
 based on all new WebPAC::Test module which makes
 test writing a joy

1 dpavlin 856 #!/usr/bin/perl -w
2    
3     use strict;
4     use blib;
5    
6 dpavlin 949 use Test::More tests => 7;
7 dpavlin 856
8     BEGIN {
9 dpavlin 949 use_ok( 'WebPAC::Test' );
10 dpavlin 856 use_ok( 'WebPAC::Common' );
11     }
12    
13     my $path = "$abs_path/conf/test.yml";
14    
15     my $common = 'WebPAC::Common';
16    
17     cmp_ok( $common->fmt_time( 123456 ), 'eq', '10h17:36', 'fmt_time' );
18    
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' );
22    
23 dpavlin 887 like $common->var_path( qw/foo bar baz/ ), qr/var.foo.bar.baz/, 'var_path';

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26