This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Guard write test against miniperl
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 12 Nov 2010 14:19:07 +0000 (15:19 +0100)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 12 Nov 2010 14:19:07 +0000 (15:19 +0100)
Miniperl does not support scalario. The test will still fail when
miniperl is called directly "./miniperl -Ilib t/op/write.t", but
it will pass "make minitest"

t/op/write.t

index 237c679..4038f43 100644 (file)
@@ -610,7 +610,11 @@ close STDOUT_DUP;
 *CmT =  *{$::{Comment}}{FORMAT};
 ok  defined *{$::{CmT}}{FORMAT}, "glob assign";
 
-{   my $buf = "";
+if ($ENV{PERL_CORE_MINITEST}) {
+    ok 1, "Skip test for miniperl, as it does not support scalario";
+}
+else {
+    my $buf = "";
     open my $fh, ">", \$buf;
     my $old_fh = select $fh;
     local $~ = "CmT";