M: Pass directory and basename to callback functions.

This commit is contained in:
Jens Luedicke
2013-03-10 19:32:42 +01:00
parent dcd092f5aa
commit 395907e53b
3 changed files with 36 additions and 16 deletions

9
t/2.t
View File

@@ -14,11 +14,16 @@ foreach my $f qw(1.t 2.t 3.t 4.t) {
$dw->setDepth(1);
$dw->onFile(sub {
my ($path) = @_;
my ($path,$dir,$basename) = @_;
ok(-e $path);
ok(-f $path);
ok(-d $dir);
is($dir, "t");
is($dw->currentDir(), "t");
is($dw->currentDir(), $dir);
is($dw->currentBasename(), $basename);
if ($dw->currentBasename() eq $f) {
if (($dw->currentBasename() eq $f) and ($basename eq $f)) {
return 42;
}