/[webpac2]/trunk/t/3-normalize-xml.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

Contents of /trunk/t/3-normalize-xml.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (show annotations)
Sat Jul 16 22:57:26 2005 UTC (18 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 695 byte(s)
improvements to WebPAC::Normalize::XML

1 #!/usr/bin/perl -w
2
3 use Test::More tests => 6;
4 use Test::Exception;
5 use Cwd qw/abs_path/;
6 use blib;
7 use strict;
8
9 BEGIN {
10 use_ok( 'WebPAC::Normalize::XML' );
11 }
12
13 ok(my $abs_path = abs_path($0), "abs_path");
14 $abs_path =~ s#/[^/]*$#/#;
15 diag "abs_path: $abs_path";
16
17 throws_ok { new WebPAC::Normalize::XML() } qr/tag/, "new without tag";
18 throws_ok { new WebPAC::Normalize::XML( tag => 'isis' ) } qr/xml_file/, "new without xml_file";
19 throws_ok { new WebPAC::Normalize::XML( tag => 'isis', xml_file => 'foo' ) } qr/file.*doesn't exist/, "new with invalid xml_file";
20 ok(my $isis = new WebPAC::Normalize::XML(
21 tag => 'isis',
22 xml_file => "$abs_path../conf/normalize/isis.xml",
23 debug => 1,
24 ), "new");
25
26

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26