From: Jarkko Hietaniemi Date: Wed, 21 May 2003 13:06:13 +0000 (+0000) Subject: VMS test tweak from Craig Berry. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a31638381a2c454a53ba8572b431fb8aae70ac33;p=p5sagit%2Fp5-mst-13.2.git VMS test tweak from Craig Berry. p4raw-id: //depot/perl@19580 --- diff --git a/lib/DirHandle.t b/lib/DirHandle.t index e83ea13..b654f6d 100755 --- a/lib/DirHandle.t +++ b/lib/DirHandle.t @@ -11,24 +11,25 @@ BEGIN { } use DirHandle; +require './test.pl'; -print "1..5\n"; +plan(5); $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 =~ /^\./; -print +(grep { $_ eq $first } @a) ? "ok" : "not ok", " 2\n"; +ok(+(grep { $_ eq $first } @a)); @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; -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; -print defined($dot->read) ? "not ok" : "ok", " 5\n"; +ok(!defined($dot->read));