--- IO-AIO/t/02_read.t 2005/07/10 18:16:50 1.2 +++ IO-AIO/t/02_read.t 2011/07/17 17:30:15 1.5 @@ -1,14 +1,12 @@ $| = 1; -if (-f "/etc/passwd" and -d "/etc") { +if (-f "AIO.xs" and -d "bin") { print "1..2\n"; } else { - print "1..0 # Skipped: unexpected /etc and/or /etc/passwd\n"; + print "1..0 # Skipped: unexpected bin and/or AIO.xs\n"; exit; } -# relies on /etc/passwd to exist... - use Fcntl; use IO::AIO; @@ -23,7 +21,7 @@ my $pwd; -aio_open "/etc/passwd", O_RDONLY, 0, sub { +aio_open "AIO.xs", O_RDONLY, 0, sub { print $_[0] ? "ok" : "not ok", " 1\n"; $pwd = $_[0]; }; @@ -37,10 +35,10 @@ # I found no way to silence the stupid "uninitialized...subroutine entry" warning. # this is just braindamaged. Don't use -w, it introduces more bugs than it fixes. -$aioread = ""; +$aioread = "xxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"; -aio_read $pwd, 7, 15, $aioread, 0, sub { - print +($aioread eq $sysread) ? "ok" : "not ok", " 2\n"; +aio_read $pwd, 7, 15, $aioread, 3, sub { + print +($aioread eq "xxx$sysread") ? "ok" : "not ok", " 2\n"; }; pcb;