Make glob.t more resilient
authorFather Chrysostomos <sprout@cpan.org>
Sun, 5 Aug 2012 19:41:48 +0000 (12:41 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 5 Aug 2012 23:02:16 +0000 (16:02 -0700)
It was not tolerating editor temp files with spaces in their
names.  It was testing the output of <op/*> by comparing it with
split /\s/, `echo op/*` on non-Windows non-VMS systems (Unix).
`ls op/* | cat` produces more machine-friendly output, so use that.

t/op/glob.t

index f122fa9..8ad827e 100644 (file)
@@ -20,7 +20,7 @@ elsif ($^O eq 'VMS') {
 }
 else {
   map { $files{$_}++ } <op/*>;
-  map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
+  map { delete $files{$_} } split /\n/, `ls op/* | cat`;
 }
 ok( !(keys(%files)),'leftover op/* files' ) or diag(join(' ',sort keys %files));