--- trunk/t/3-normalize-xml.t 2005/11/19 23:48:24 70 +++ trunk/t/3-normalize-xml.t 2005/12/16 14:40:55 260 @@ -18,7 +18,16 @@ throws_ok { new WebPAC::Normalize::XML( lookup_regex => 'foo' ) } qr/pair/, "lookup_regex without lookup"; throws_ok { new WebPAC::Normalize::XML( lookup => 'bar' ) } qr/pair/, "lookup without lookup_regex"; -ok(my $n = new WebPAC::Normalize::XML( debug => 0 ), "new"); +ok(my $n = new WebPAC::Normalize::XML( + debug => 1, + filter => { + regex => sub { + my ($val, $regex) = @_; + eval "\$val =~ $regex"; + return $val; + }, + }, +), "new"); throws_ok { $n->open() } qr/tag/, "open without tag"; throws_ok { $n->open( tag => 'isis' ) } qr/xml_file/, "open without xml_file"; @@ -131,5 +140,5 @@ ok(my $ds = $n->data_structure( $rec ), "data_structure"); -diag Dumper($rec, $ds); +#diag Dumper($rec, $ds);