diff options
author | Tony Cook <tony@develop-help.com> | 2012-05-31 19:27:45 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2012-06-01 21:21:32 +1000 |
commit | e63826fe20c35e013038e0990b2b011be4e7a32b (patch) | |
tree | b76b90d8f3e4dc7f886136f030008c29da45172a /dist | |
parent | b626ecd96d0a4605fcd3ec87b70f09d4df690ed5 (diff) | |
download | perl-e63826fe20c35e013038e0990b2b011be4e7a32b.tar.gz |
convert dist/IO/t/io_xs.t to Test::More
Diffstat (limited to 'dist')
-rw-r--r-- | dist/IO/t/io_xs.t | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dist/IO/t/io_xs.t b/dist/IO/t/io_xs.t index 585eed84b2..379094f2d6 100644 --- a/dist/IO/t/io_xs.t +++ b/dist/IO/t/io_xs.t @@ -15,16 +15,16 @@ BEGIN { } } +use Test::More tests => 4; use IO::File; use IO::Seekable; -print "1..4\n"; - -$x = new_tmpfile IO::File or print "not "; -print "ok 1\n"; +$x = new_tmpfile IO::File; +ok($x, "new_tmpfile"); print $x "ok 2\n"; $x->seek(0,SEEK_SET); -print <$x>; +my $line = <$x>; +is($line, "ok 2\n", "check we can write to the tempfile"); $x->seek(0,SEEK_SET); print $x "not ok 3\n"; @@ -32,9 +32,10 @@ $p = $x->getpos; print $x "ok 3\n"; $x->flush; $x->setpos($p); -print scalar <$x>; +$line = <$x>; +is($line, "ok 3\n", "test getpos/setpos"); $! = 0; $x->setpos(undef); -print $! ? "ok 4 # $!\n" : "not ok 4\n"; +ok($!, "setpos(undef) makes errno non-zero"); |