/[webpac2]/trunk/t/2-parse.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/2-parse.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 687 - (hide annotations)
Sun Sep 24 17:49:05 2006 UTC (17 years, 7 months ago) by dpavlin
File MIME type: application/x-troff
File size: 730 byte(s)
 r969@llin:  dpavlin | 2006-09-24 19:47:01 +0200
 use Log::Log4perl for logging

1 dpavlin 686 #!/usr/bin/perl -w
2    
3     use strict;
4     use Test::More tests => 8;
5     use Test::Exception;
6     use blib;
7    
8     use Data::Dump qw/dump/;
9     use Cwd qw/abs_path/;
10     use YAML qw/LoadFile/;
11    
12     BEGIN {
13     use_ok( 'WebPAC::Parser' );
14     use_ok( 'WebPAC::Config' );
15     }
16    
17     my $debug = shift @ARGV;
18    
19     ok(my $abs_path = abs_path($0), "abs_path");
20     $abs_path =~ s#/[^/]*$#/#;
21    
22     my $config_path = "$abs_path/conf/test.yml";
23    
24     ok(-e $config_path, "$config_path exists");
25    
26     throws_ok { new WebPAC::Parser( no_log => 1 ) } qr/WebPAC::Config/, "new without config";
27    
28     ok(
29     my $parser = new WebPAC::Parser(
30     config => new WebPAC::Config( path => $config_path ),
31     base_path => $abs_path,
32 dpavlin 687 debug => $debug,
33 dpavlin 686 ), "new");
34    
35     ok($parser->{source}, "source exist");
36    
37     ok($parser->parse, 'parse');

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26