summaryrefslogtreecommitdiff
path: root/t/lib/selectsaver.t
diff options
context:
space:
mode:
authorGisle Aas <aas@aas.no>1996-09-22 00:59:56 +0200
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-22 00:59:56 +0200
commit1a3850a59b9c97ab76cb84b312a9b18e9a2cb3d6 (patch)
tree3da90e5219cc38029477ff010a08c6dc5add516f /t/lib/selectsaver.t
parent782014036373aee8ffee0c1b2c77f3a283d90dc7 (diff)
downloadperl-1a3850a59b9c97ab76cb84b312a9b18e9a2cb3d6.tar.gz
More standard library test scripts
This is a collection of test scripts for the standard library modules. Some of the tests does not pass unless some of the patches I have sent out are applied.
Diffstat (limited to 't/lib/selectsaver.t')
-rw-r--r--t/lib/selectsaver.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/lib/selectsaver.t b/t/lib/selectsaver.t
new file mode 100644
index 0000000000..3b58d709ab
--- /dev/null
+++ b/t/lib/selectsaver.t
@@ -0,0 +1,28 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+print "1..3\n";
+
+use SelectSaver;
+
+open(FOO, ">foo-$$") || die;
+
+print "ok 1\n";
+{
+ my $saver = new SelectSaver(FOO);
+ print "foo\n";
+}
+
+# Get data written to file
+open(FOO, "foo-$$") || die;
+chomp($foo = <FOO>);
+close FOO;
+unlink "foo-$$";
+
+print "ok 2\n" if $foo eq "foo";
+
+print "ok 3\n";