Remove code specific to MacOS Classic from core tests
[p5sagit/p5-mst-13.2.git] / t / japh / abigail.t
index 06bba7a..6ff5358 100644 (file)
@@ -16,7 +16,7 @@
 # is unfortunately not a trivial task.
 #
 # WARNING: these tests are obfuscated.  Do not get frustrated.
-# Ask Abigail <abigail@foad.org>, or use the Deparse or Concise
+# Ask Abigail <abigail@abigail.be>, or use the Deparse or Concise
 # modules (the former parses Perl to Perl, the latter shows the
 # op syntax tree) like this:
 # ./perl -Ilib -MO=Deparse foo.pl
@@ -140,7 +140,7 @@ plan tests => 130;
 {
     my $datafile = "datatmp000";
     1 while -f ++ $datafile;
-    END {unlink_all $datafile}
+    END {unlink_all $datafile if $datafile}
 
     open  MY_DATA, "> $datafile" or die "Failed to open $datafile: $!";
     print MY_DATA  << "    --";
@@ -220,24 +220,24 @@ plan tests => 130;
 {
     my $progfile = "progtmp000";
     1 while -f ++ $progfile;
-    END {unlink_all $progfile}
+    END {unlink_all $progfile if $progfile}
 
     my @programs = (<< '    --', << '    --');
-#!./perl               --    # No trailing newline after the last line!    
+#!./perl
 BEGIN{$|=$SIG{__WARN__}=sub{$_=$_[0];y-_- -;print/(.)"$/;seek _,-open(_ 
 ,"+<$0"),2;truncate _,tell _;close _;exec$0}}//rekcaH_lreP_rehtona_tsuJ
     --
-#!./perl               --   # Remove trailing newline!
+#!./perl
 BEGIN{$SIG{__WARN__}=sub{$_=pop;y-_- -;print/".*(.)"/;  
 truncate$0,-1+-s$0;exec$0;}}//rekcaH_lreP_rehtona_tsuJ
     --
     chomp @programs;
 
-    if ($^O eq 'VMS') {
+    if ($^O eq 'VMS' or $^O eq 'MSWin32') {
         # VMS needs extensions for files to be executable,
         # but the Japhs above rely on $0 being exactly the
         # filename of the program.
-        skip "VMS", 2 * @programs;
+        skip $^O, 2 * @programs;
         last
     }
 
@@ -254,8 +254,7 @@ truncate$0,-1+-s$0;exec$0;}}//rekcaH_lreP_rehtona_tsuJ
         close   $fh or die "Failed to close $progfile: $!\n";
 
         chmod 0755   => $progfile or die "Failed to chmod $progfile: $!\n";
-        my $command  = "./$progfile";
-           $command .= ' 2>&1' unless $^O eq 'MacOS';
+        my $command  = "./$progfile 2>&1";
         if ( $^O eq 'qnx' ) {
           skip "#!./perl not supported in QNX4";
           skip "#!./perl not supported in QNX4";
@@ -282,14 +281,14 @@ $_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
 for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
 print chr 0x$& and q
 qq}*excess********}
-SKIP_OS: qnx
+SKIP: $* was removed.
 
 #######  Funky loop 3.
 $_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
 for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
 print chr 0x$& and q
 qq}*excess********}
-SKIP_OS: qnx
+SKIP: $* was removed.
 
 #######  Funky loop 4.
 $_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
@@ -416,9 +415,9 @@ EXPECT:   6
 SWITCHES
 -Mstrict='}); print "Just another Perl Hacker"; ({'
 -l
-SKIP_OS: VMS
-MSWin32
-NetWare
+SKIP: No longer works in 5.8.2 and beyond.
+SKIP_OS: MSWin32
+SKIP_OS: NetWare
 
 #######  rand
 srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
@@ -475,27 +474,32 @@ SKIP: Abuses a fixed bug.
 
 #######  Prototype fun 2
 print prototype sub "Just another Perl Hacker" {};
+SKIP: Abuses a fixed bug.
 
 #######  Prototype fun 3
 sub _ "Just another Perl Hacker"; print prototype \&_
+SKIP: Abuses a fixed bug.
 
 #######  Split 1
                split // => '"';
 ${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
 *{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
 %{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
+SKIP: Hashes are now randomized.
 EXPECT: $JaPH_s
 
 #######  Split 2
 $" = "/"; split // => eval join "+" => 1 .. 7;
 *{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
 %_ = (Just => another => Perl => Hacker); &{%_};
+SKIP: Hashes are now randomized.
 EXPECT: $JaPH_s
 
 #######  Split 3
 $" = "/"; split $, => eval join "+" => 1 .. 7;
 *{"@_"} = sub  {foreach (sort keys %_) {print "$_ $_{$_} "}};
 %{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
+SKIP: Hashes are now randomized.
 EXPECT: $JaPH_s
 
 #######  Here documents 1
@@ -649,6 +653,7 @@ eval {die ["Just another Perl Hacker\n"]}; print ${${@}}[$#{@{${@}}}]
 ####### die 5
 eval {die [[qq [Just another Perl Hacker]]]};; print
 ${${${@}}[$#{@{${@}}}]}[$#{${@{${@}}}[$#{@{${@}}}]}]
+SKIP: Abuses a fixed bug; what is in $#{...} must be an arrayref, not an array
 
 ####### Closure returning itself.
 $_ = "\nrekcaH lreP rehtona tsuJ"; my $chop; $chop = sub {print chop; $chop};