This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update TOC for perl5153delta
[perl5.git] / t / io / say.t
index 62cec80..70f83a7 100644 (file)
@@ -3,6 +3,9 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    require './test.pl';
+    eval 'use Errno';
+    die $@ if $@ and !is_miniperl();
 }
 
 # Just a few very basic tests cribbed from t/io/print.t,
@@ -11,12 +14,9 @@ BEGIN {
 # the same way as print in any case.
 
 use strict 'vars';
-eval 'use Errno';
-die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
-
 use feature "say";
 
-say "1..11";
+say "1..13";
 
 my $foo = 'STDOUT';
 say $foo "ok 1";
@@ -47,3 +47,14 @@ say;
 
 $_ = "ok 11";
 say STDOUT;
+
+{
+    # test that $, doesn't show up before the trailing \n
+    local $, = "\nnot ok 13"; # how to fool Test::Harness
+    say "ok 12";
+}
+
+{
+    no feature 'say';
+    CORE::say "ok 13 - CORE::say without feature.pm";
+}