add print.t with testing of implicit printing of $_
authorGerard Goossen <gerard@ggoossen.net>
Thu, 19 Nov 2009 10:21:52 +0000 (11:21 +0100)
committerRafael Garcia-Suarez <rgs@consttype.org>
Sun, 25 Jul 2010 21:33:20 +0000 (23:33 +0200)
MANIFEST
t/op/print.t [new file with mode: 0644]

index f4ddd0e..cfb4222 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4502,6 +4502,7 @@ t/op/packagev.t                   See if package VERSION work
 t/op/pack.t                    See if pack and unpack work
 t/op/pos.t                     See if pos works
 t/op/pow.t                     See if ** works
+t/op/print.t                   See if print works
 t/op/protowarn.t               See if the illegalproto warnings work
 t/op/push.t                    See if push and pop work
 t/op/pwent.t                   See if getpw*() functions work
diff --git a/t/op/print.t b/t/op/print.t
new file mode 100644 (file)
index 0000000..3752251
--- /dev/null
@@ -0,0 +1,12 @@
+#!./perl
+
+BEGIN {
+    require "test.pl";
+}
+
+plan(2);
+
+fresh_perl_is('$_ = qq{OK\n}; print;', "OK\n",
+              'print without arguments outputs $_');
+fresh_perl_is('$_ = qq{OK\n}; print STDOUT;', "OK\n",
+              'print with only a filehandle outputs $_');