This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] t/op/crypt.t
[perl5.git] / t / op / runlevel.t
index b6c128b..1364801 100755 (executable)
@@ -10,6 +10,7 @@ chdir 't' if -d 't';
 @INC = '../lib';
 $Is_VMS = $^O eq 'VMS';
 $Is_MSWin32 = $^O eq 'MSWin32';
+$Is_NetWare = $^O eq 'NetWare';
 $ENV{PERL5LIB} = "../lib" unless $Is_VMS;
 
 $|=1;
@@ -35,6 +36,8 @@ for (@prgs){
                   `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
                      $Is_MSWin32 ?  
                          `.\\perl -I../lib $switch $tmpfile 2>&1` :
+                     $Is_NetWare ?  
+                         `perl -I../lib $switch $tmpfile 2>&1` :
                              `./perl $switch $tmpfile 2>&1`;
     my $status = $?;
     $results =~ s/\n+$//;
@@ -176,11 +179,13 @@ print "bar reached\n";
 EXPECT
 Can't "goto" out of a pseudo block at - line 2.
 ########
+%seen = ();
 sub sortfn {
   (split(/./, 'x'x10000))[0];
   my (@y) = ( 4, 6, 5);
   @y = sort { $a <=> $b } @y;
-  print "sortfn ".join(', ', @y)."\n";
+  my $t = "sortfn ".join(', ', @y)."\n";
+  print $t if ($seen{$t}++ == 0);
   return $_[0] <=> $_[1];
 }
 @x = ( 3, 2, 1 );
@@ -188,8 +193,6 @@ sub sortfn {
 print "---- ".join(', ', @x)."\n";
 EXPECT
 sortfn 4, 5, 6
-sortfn 4, 5, 6
-sortfn 4, 5, 6
 ---- 1, 2, 3
 ########
 @a = (3, 2, 1);