Skip Menu |

This queue is for tickets about the File-Fu CPAN distribution.

Report information
The Basics
Id: 57472
Status: new
Priority: 0/
Queue: File-Fu

People
Owner: Nobody in particular
Requestors: dam [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v0.0.7
Fixed in: (no value)



Subject: [patch] findknob.t failing on tmpfs
Hi, It appears findknob.t fails when the first item returned by ->list is foo/ (the *directory*). This happens on tmpfs filesystem and makes $x be 'foo/', which will never match the subsequent search for *files* named like $x. Sorting the ->list output (see the attached patch) makes the test pass regardles of the order the entries are returned. This was reported as Debian bug 573657 (http://bugs.debian.org/573657) Please consider including the patch in a future release. Thanks, dam Debian Perl Group
Subject: findknob.t-on-tmpfs.patch
Description: Fix the test on tmpfs On tmpfs, the directory is the first item in the list, causing all files to be deleted, subsequentialy failing the test that the first item iis a file and is found with find() Bug: pending Bug-Debian: http://bugs.debian.org/573657 Author: Damyan Ivanov <dmn@debian.org> Last-Update: 2010-05-13 --- a/t/findknob.t +++ b/t/findknob.t @@ -19,7 +19,9 @@ $foo->basename->symlink($topdir/'link'); # bah! my $x = do { - my @files = $topdir->list; + # for this test to succeed, $files[0] must not be foo/ (a directory) + # to achieve this, we sort the list + my @files = sort $topdir->list; my ($i) = grep({$files[$_]->basename eq 'foo/'} 0..$#files); $_->unlink for(@files[($i+1)..$#files]); #warn join("|", $topdir->contents);