summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-29 18:24:36 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-29 18:24:36 -0700
commit96db40ac3837bf348704634acdc080cf8e329c00 (patch)
tree9b89de91d478495bca0d9c3a1cc61894ab3a4e67 /t
parentd6d78e19334f3abcd2eb659205839eb1295aacbf (diff)
downloadperl-96db40ac3837bf348704634acdc080cf8e329c00.tar.gz
&CORE::write()
This commit allows &CORE::write to be called through references and via ampersand syntax. No change to pp_enterwrite was necessary, as it can already handle nulls.
Diffstat (limited to 't')
-rw-r--r--t/op/coreamp.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 9ab153bc29..2027f41ac5 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -822,6 +822,12 @@ test_proto 'warn';
lis [&mywarn()], [1], '&warn retval in list context';
}
+test_proto 'write';
+$tests ++;
+eval {&mywrite};
+like $@, qr'^Undefined format "STDOUT" called',
+ "&write without arguments can handle the null";
+
# This is just a check to make sure we have tested everything. If we
# haven’t, then either the sub needs to be tested or the list in
# gv.c is wrong.