summaryrefslogtreecommitdiff
path: root/t/op.magic
diff options
context:
space:
mode:
Diffstat (limited to 't/op.magic')
-rw-r--r--t/op.magic27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/op.magic b/t/op.magic
new file mode 100644
index 0000000000..7696803127
--- /dev/null
+++ b/t/op.magic
@@ -0,0 +1,27 @@
+#!./perl
+
+# $Header: op.magic,v 1.0 87/12/18 13:13:54 root Exp $
+
+print "1..4\n";
+
+$| = 1; # command buffering
+
+$ENV{'foo'} = 'hi there';
+if (`echo \$foo` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";}
+
+$! = 0;
+open(foo,'ajslkdfpqjsjfkslkjdflksd');
+if ($! == 2) {print "ok 2\n";} else {print "not ok 2\n";}
+
+$SIG{'INT'} = 'ok3';
+kill 2,$$;
+$SIG{'INT'} = 'IGNORE';
+kill 2,$$;
+print "ok 4\n";
+$SIG{'INT'} = 'DEFAULT';
+kill 2,$$;
+print "not ok\n";
+
+sub ok3 {
+ print "ok 3\n" if pop(@_) eq 'INT';
+}