From 28f6649022f8901bbb00e1c2c0befaf1bfd21c2b Mon Sep 17 00:00:00 2001 From: Paul Green Date: Wed, 27 Mar 2013 12:15:40 -0400 Subject: [PATCH] add a special case for VOS handling of file position after open in tell.t --- t/io/tell.t | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/t/io/tell.t b/t/io/tell.t index 1e577cb..f9226b0 100644 --- a/t/io/tell.t +++ b/t/io/tell.t @@ -152,12 +152,24 @@ open($tst,">>$written") || die "Cannot open $written:$!"; # This test makes a questionable assumption that the file pointer will # be at eof after opening a file but before seeking, reading, or writing. -# Only known failure is on cygwin. -my $todo = $^O eq "cygwin" && &PerlIO::get_layers($tst) eq 'stdio' - && ' # TODO: file pointer not at eof'; +# The POSIX standard is vague on this point. +# Cygwin and VOS differ from other implementations. + +if (tell ($tst) == 6) { + print "ok 28\n"; +} +else { + if (($^O eq "cygwin") && (&PerlIO::get_layers($tst) eq 'stdio')) { + print "not ok 28 # TODO: file pointer not at eof\n"; + } + elsif ($^O eq "vos") { + print "not ok 28 # TODO: Hit bug posix-2056. file pointer not at eof\n"; + } + else { + print "not ok 28 - file pointer not at eof\n"; + } +} -if (tell($tst) == 6) -{ print "ok 28$todo\n"; } else { print "not ok 28$todo\n"; } close $tst; open FH, "test.pl"; -- 2.7.4