Skip Menu |

This queue is for tickets about the Path-Iter CPAN distribution.

Report information
The Basics
Id: 123967
Status: open
Priority: 0/
Queue: Path-Iter

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

Bug Information
Severity: (no value)
Broken in: 0.2
Fixed in: (no value)



Subject: No symlinks on MSWin32
The test suite fails on all Windows systems: http://matrix.cpantesters.org/?dist=Path-Iter%200.2 It seems that symlinks are not available on these systems: ... # Testing Path::Iter 0.2 The symlink function is unimplemented at t/00.load.t line 13. # Looks like your test exited with 255 just after 1. t/00.load.t ....... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 13/14 subtests ...
Patch to skip symplink-related tests on Windows. -- Alexandr Ciornii, http://chorny.net
Subject: 00.load.t.patch
--- 00.load.t.dist 2017-12-30 22:59:09.000000000 +0200 +++ 00.load.t 2017-12-30 23:10:29.312500000 +0200 @@ -10,9 +10,6 @@ chdir 't'; # just in case we're not already there BAIL_OUT('I am not in the right place, sorry') if !-d 'path'; -symlink('path','link'); -BAIL_OUT('Could not make the symlink') if !-l 'link'; - my @lookup_build = ( [qw(dir.a)], [qw(file.b)], @@ -36,6 +33,14 @@ $results{$key}++; } is_deeply(\%results, \%path_lookup, 'path traversal'); + + +SKIP: { +skip "Symlinks not supported", 10 if $^O eq 'MSWin32'; + +symlink('path','link'); +BAIL_OUT('Could not make the symlink') if !-l 'link'; + %results = (); $iter = Path::Iter::get_iterator('link/'); while(my $key = $iter->()) { @@ -79,6 +84,9 @@ ok(exists $initial{'path'}, 'arg change included'); ok(keys %initial == 1, 'arg change changed'); +} + + my @results; $iter = Path::Iter::get_iterator('path/', { 'readdir_handler' => sub { my ($dir, @contents) = @_; sort { $a cmp $b } @contents } }); while(my $key = $iter->()) {