From a9bec28731f6ff92754c2d5febd8958a20ef8e7e Mon Sep 17 00:00:00 2001 From: Gerard Goossen Date: Thu, 19 Nov 2009 11:21:52 +0100 Subject: [PATCH] add print.t with testing of implicit printing of $_ --- MANIFEST | 1 + t/op/print.t | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 t/op/print.t diff --git a/MANIFEST b/MANIFEST index f4ddd0e..cfb4222 100644 --- 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 index 0000000..3752251 --- /dev/null +++ b/t/op/print.t @@ -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 $_'); -- 2.7.4