Couple of tests from #7660 salvaged.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Nov 2000 00:23:44 +0000 (00:23 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Nov 2000 00:23:44 +0000 (00:23 +0000)
p4raw-id: //depot/perl@7664

MANIFEST
t/io/tell.t
t/op/tell.t [deleted file]

index 3161168..eb1ec5c 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1554,7 +1554,6 @@ t/op/subst_wamp.t See if substitution works with $& present
 t/op/substr.t          See if substr works
 t/op/sysio.t           See if sysread and syswrite work
 t/op/taint.t           See if tainting works
-t/op/tell.t            See if tell works
 t/op/tie.t             See if tie/untie functions work
 t/op/tiearray.t                See if tie for arrays works
 t/op/tiehandle.t       See if tie for handles works
index b89aefb..560836d 100755 (executable)
@@ -2,7 +2,7 @@
 
 # $RCSfile: tell.t,v $$Revision$$Date$
 
-print "1..21\n";
+print "1..23\n";
 
 $TST = 'tst';
 
@@ -82,3 +82,13 @@ if ($. == $curline) { print "ok 20\n"; } else { print "not ok 20\n"; }
     tell other;
     if ($. == 7) { print "ok 21\n"; } else { print "not ok 21\n"; }
 }
+
+close(other);
+if (tell(other) == -1)  { print "ok 22\n"; } else { print "not ok 22\n"; }
+
+if (tell(ether) == -1)  { print "ok 23\n"; } else { print "not ok 23\n"; }
+
+# ftell(STDIN) (or any std streams) is undefined, it can return -1 or
+# something else.  ftell() on pipes, fifos, and sockets is defined to
+# return -1.
+
diff --git a/t/op/tell.t b/t/op/tell.t
deleted file mode 100644 (file)
index a4500d1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!./perl
-
-BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
-}
-
-# NOTE: we cannot use seek() here because using that *portably* would mean
-# using Fcntl and the principle is not to use any extensions in the t/op/*
-
-print "1..6\n";
-
-{
-no warnings 'io';
-print "not " unless tell(TEST) == -1;
-print "ok 1\n";
-}
-
-open(TEST, "TEST")     || die "$0: failed to open 'TEST' for reading: $!\n";
-
-print "not " unless tell(TEST) == 0;
-print "ok 2\n";
-
-my ($s, $read);
-
-$read = read(TEST, $s, 2);
-
-$read == 2             || warn "$0: read() returned $read, expected 2\n";
-$s eq '#!'             || warn "$0: read() read '$s', expected '#!'\n";
-
-print "not " unless tell(TEST)  == 2;
-print "ok 3\n";
-
-print "not " unless tell()      == 2;
-print "ok 4\n";
-
-my $TEST = 'TEST';
-
-print "not " unless tell($TEST) == 2;
-print "ok 5\n";
-
-close(TEST)            || warn "$0: close() failed: $!\n";
-
-{
-no warnings 'io';
-print "not " unless tell(TEST) == -1;
-print "ok 6\n";
-}
-
-# ftell(STDIN) (or any std streams) is undefined, it can return -1 or
-# something else.  ftell() on pipes, fifos, and sockets is defined to
-# return -1.
-