This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes to compile Perl with g++ and DEBUGGING.
[perl5.git]
/
lib
/
DirHandle.t
diff --git
a/lib/DirHandle.t
b/lib/DirHandle.t
index
e83ea13
..
b654f6d
100755
(executable)
--- a/
lib/DirHandle.t
+++ b/
lib/DirHandle.t
@@
-11,24
+11,25
@@
BEGIN {
}
use DirHandle;
}
use DirHandle;
+require './test.pl';
-p
rint "1..5\n"
;
+p
lan(5)
;
$dot = new DirHandle ($^O eq 'MacOS' ? ':' : '.');
$dot = new DirHandle ($^O eq 'MacOS' ? ':' : '.');
-
print defined($dot) ? "ok" : "not ok", " 1\n"
;
+
ok(defined($dot))
;
@a = sort <*>;
do { $first = $dot->read } while defined($first) && $first =~ /^\./;
@a = sort <*>;
do { $first = $dot->read } while defined($first) && $first =~ /^\./;
-
print +(grep { $_ eq $first } @a) ? "ok" : "not ok", " 2\n"
;
+
ok(+(grep { $_ eq $first } @a))
;
@b = sort($first, (grep {/^[^.]/} $dot->read));
@b = sort($first, (grep {/^[^.]/} $dot->read));
-
print +(join("\0", @a) eq join("\0", @b)) ? "ok" : "not ok", " 3\n"
;
+
ok(+(join("\0", @a) eq join("\0", @b)))
;
$dot->rewind;
@c = sort grep {/^[^.]/} $dot->read;
$dot->rewind;
@c = sort grep {/^[^.]/} $dot->read;
-
print +(join("\0", @b) eq join("\0", @c)) ? "ok" : "not ok", " 4\n"
;
+
cmp_ok(+(join("\0", @b), 'eq', join("\0", @c)))
;
$dot->close;
$dot->rewind;
$dot->close;
$dot->rewind;
-
print defined($dot->read) ? "not ok" : "ok", " 5\n"
;
+
ok(!defined($dot->read))
;