1N/A#!./perl
1N/A
1N/ABEGIN {
1N/A unless(grep /blib/, @INC) {
1N/A chdir 't' if -d 't';
1N/A @INC = '../lib';
1N/A }
1N/A}
1N/A
1N/Ause Config;
1N/A
1N/ABEGIN {
1N/A if($ENV{PERL_CORE}) {
1N/A if ($Config{'extensions'} !~ /\bIO\b/) {
1N/A print "1..0 # Skip: IO extension not built\n";
1N/A exit 0;
1N/A }
1N/A }
1N/A if( $^O eq 'VMS' && $Config{'vms_cc_type'} ne 'decc' ) {
1N/A print "1..0 # Skip: not compatible with the VAXCRTL\n";
1N/A exit 0;
1N/A }
1N/A}
1N/A
1N/Ause IO::File;
1N/Ause IO::Seekable;
1N/A
1N/Aprint "1..4\n";
1N/A
1N/A$x = new_tmpfile IO::File or print "not ";
1N/Aprint "ok 1\n";
1N/Aprint $x "ok 2\n";
1N/A$x->seek(0,SEEK_SET);
1N/Aprint <$x>;
1N/A
1N/A$x->seek(0,SEEK_SET);
1N/Aprint $x "not ok 3\n";
1N/A$p = $x->getpos;
1N/Aprint $x "ok 3\n";
1N/A$x->flush;
1N/A$x->setpos($p);
1N/Aprint scalar <$x>;
1N/A
1N/A$! = 0;
1N/A$x->setpos(undef);
1N/Aprint $! ? "ok 4 # $!\n" : "not ok 4\n";
1N/A