Subject: | [PATCH] Tests fail under Perl 5.004 and 5.005 |
Hello,
Attached is a patch to improve tests under Perl 5.004 and 5.005.
Also, I modified t/03-attribs.t to use Test::More and it prints the
following differences, which explains the last remaining failure:
t/03-attribs...........NOK 1
# Failed test 'Attributes parsed correctly'
# in t/03-attribs.t at line 12.
# Structures begin differing at:
# $got->[0]{attrib}{b} = 'B & C'
# $expected->[0]{attrib}{b} = 'B & C'
# Looks like you failed 1 test of 1.
t/03-attribs...........dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Regards,
--
Close the world, txEn eht nepO.
Subject: | XML-Tiny-1.01-oldperl.diff |
Seulement dans XML-Tiny-1.01: blib
Seulement dans XML-Tiny-1.01: Makefile
Seulement dans XML-Tiny-1.01: Makefile.old
Seulement dans XML-Tiny-1.01: pm_to_blib
diff -ru XML-Tiny-1.01-orig/t/00-file-handling.t XML-Tiny-1.01/t/00-file-handling.t
--- XML-Tiny-1.01-orig/t/00-file-handling.t 2007-01-29 23:45:38.000000000 +0100
+++ XML-Tiny-1.01/t/00-file-handling.t 2007-01-30 10:19:38.108593592 +0100
@@ -1,9 +1,9 @@
+use FileHandle;
use XML::Tiny qw(parsefile);
use strict;
require "t/test_functions";
-my $tests = $] >= 5.005003 ? 6 : 5;
-print "1..$tests\n";
+print "1..6\n";
$^W = 1;
@@ -30,15 +30,15 @@
);
close(FOO);
-if($] >= 5.005003) { # lexical filehandles! woo!
- open(my $foo, 't/minimal.xml');
- is_deeply(
+
+my $foo = new FileHandle;
+open($foo, 't/minimal.xml');
+is_deeply(
parsefile($foo),
[{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }],
"Passing a lexical filehandle works"
- );
- close($foo);
-}
+);
+close($foo);
is_deeply(
parsefile('_TINY_XML_STRING_<x></x>'),
diff -ru XML-Tiny-1.01-orig/t/03-attribs.t XML-Tiny-1.01/t/03-attribs.t
--- XML-Tiny-1.01-orig/t/03-attribs.t 2007-01-29 23:51:16.000000000 +0100
+++ XML-Tiny-1.01/t/03-attribs.t 2007-01-30 10:22:46.637932776 +0100
@@ -1,8 +1,9 @@
use XML::Tiny qw(parsefile);
use strict;
-require "t/test_functions";
-print "1..1\n";
+#require "t/test_functions";
+#print "1..1\n";
+use Test::More tests=> 1;
$^W = 1;