tags 353855 patch
thanks

t/synopsis2 seems to assume that readdir actually returns the
contents of a directory in alphabetically sorted order, which
is of course not true in most cases. The following patch sorts
the results before comparing them to the expected results.

The check in debian/rules clean ensures that one can build the
package twice even if the first build failed in "make test".

I can NMU this fix if you want.

diff -Naur libio-all-perl-0.33/debian/rules libio-all-perl-0.33.new/debian/rules
--- libio-all-perl-0.33/debian/rules    2006-11-12 16:22:52.000000000 +0100
+++ libio-all-perl-0.33.new/debian/rules        2006-11-12 16:23:36.000000000 
+0100
@@ -19,6 +19,7 @@
        dh_testdir
        dh_testroot
        -$(MAKE) distclean
+       [ ! -f t/spiffy.t.dontuse ] || mv t/spiffy.t.dontuse t/spiffy.t
        dh_clean build-stamp install-stamp
 
 install: install-stamp
diff -Naur libio-all-perl-0.33/t/synopsis2.t 
libio-all-perl-0.33.new/t/synopsis2.t
--- libio-all-perl-0.33/t/synopsis2.t   2004-11-30 08:30:41.000000000 +0100
+++ libio-all-perl-0.33.new/t/synopsis2.t       2006-11-12 16:22:01.000000000 
+0100
@@ -8,12 +8,16 @@
 # Print name and first line of all files in a directory
 my $dir = io('t/mydir'); 
 ok($dir->is_dir);
+my @results;
 while (my $io = $dir->next) {
     if ($io->is_file) {
         my $line = $io->name . ' - ' . $io->getline;
-        is($line, flip_slash scalar <DATA>);
+       push @results, $line;
     }
 }
+foreach my $line (sort @results) {
+    is($line, flip_slash scalar <DATA>);
+}
 
 # Print name of all files recursively
 is("$_\n", flip_slash scalar <DATA>)

Gruesse,
-- 
Frank Lichtenheld <[EMAIL PROTECTED]>
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to