diff options
Diffstat (limited to 't/op')
-rwxr-xr-x | t/op/anonsub.t | 5 | ||||
-rwxr-xr-x | t/op/closure.t | 5 | ||||
-rwxr-xr-x | t/op/die_exit.t | 2 | ||||
-rwxr-xr-x | t/op/exec.t | 2 | ||||
-rwxr-xr-x | t/op/fork.t | 9 | ||||
-rwxr-xr-x | t/op/goto.t | 2 | ||||
-rwxr-xr-x | t/op/groups.t | 2 | ||||
-rw-r--r-- | t/op/lfs.t | 2 | ||||
-rwxr-xr-x | t/op/magic.t | 7 | ||||
-rwxr-xr-x | t/op/misc.t | 7 | ||||
-rwxr-xr-x | t/op/rand.t | 1 | ||||
-rwxr-xr-x | t/op/runlevel.t | 3 | ||||
-rwxr-xr-x | t/op/split.t | 1 | ||||
-rwxr-xr-x | t/op/stat.t | 21 | ||||
-rwxr-xr-x | t/op/sysio.t | 2 | ||||
-rwxr-xr-x | t/op/taint.t | 10 | ||||
-rwxr-xr-x | t/op/write.t | 5 |
17 files changed, 53 insertions, 33 deletions
diff --git a/t/op/anonsub.t b/t/op/anonsub.t index aa25de0131..0e4c40494f 100755 --- a/t/op/anonsub.t +++ b/t/op/anonsub.t @@ -5,6 +5,7 @@ chdir 't' if -d 't'; $Is_VMS = $^O eq 'VMS'; $Is_MSWin32 = $^O eq 'MSWin32'; $Is_MacOS = $^O eq 'MacOS'; +$Is_NetWare = $^O eq 'NetWare'; $ENV{PERL5LIB} = "../lib" unless $Is_VMS; $|=1; @@ -32,7 +33,9 @@ for (@prgs){ `.\\perl -I../lib $switch $tmpfile 2>&1` : $Is_MacOS ? `$^X -I::lib $switch $tmpfile` : - `./perl $switch $tmpfile 2>&1`; + $Is_NetWare ? + `perl -I../lib $switch $tmpfile 2>&1` : + `./perl $switch $tmpfile 2>&1`; my $status = $?; $results =~ s/\n+$//; # allow expected output to be written as if $prog is on STDIN diff --git a/t/op/closure.t b/t/op/closure.t index 633428607e..159392c93b 100755 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -429,7 +429,7 @@ END $test++; } - if ($Config{d_fork} and $^O ne 'VMS' and $^O ne 'MSWin32') { + if ($Config{d_fork} and $^O ne 'VMS' and $^O ne 'MSWin32' and $^O ne 'NetWare') { # Fork off a new perl to run the tests. # (This is so we can catch spurious warnings.) $| = 1; print ""; $| = 0; # flush output before forking @@ -466,9 +466,10 @@ END my $cmd = (($^O eq 'VMS') ? "MCR $^X" : ($^O eq 'MSWin32') ? '.\perl' : ($^O eq 'MacOS') ? $^X + : ($^O eq 'NetWare') ? 'perl' : './perl'); $cmd .= " -w $cmdfile 2>$errfile"; - if ($^O eq 'VMS' or $^O eq 'MSWin32') { + if ($^O eq 'VMS' or $^O eq 'MSWin32' or $^O eq 'NetWare') { # Use pipe instead of system so we don't inherit STD* from # this process, and then foul our pipe back to parent by # redirecting output in the child. diff --git a/t/op/die_exit.t b/t/op/die_exit.t index f758f9c237..18d8babfdc 100755 --- a/t/op/die_exit.t +++ b/t/op/die_exit.t @@ -50,7 +50,7 @@ foreach my $test (1 .. $max) { my($bang, $query, $code) = @{$tests{$test}}; $code ||= 'die;'; my $exit = - ($^O eq 'MSWin32' + (($^O eq 'MSWin32' || $^O eq 'NetWare') ? system qq($perl -e "\$! = $bang; \$? = $query; $code" 2> nul) : system qq($perl -e '\$! = $bang; \$? = $query; $code' 2> /dev/null)); diff --git a/t/op/exec.t b/t/op/exec.t index 57a114e766..2defb47db4 100755 --- a/t/op/exec.t +++ b/t/op/exec.t @@ -5,7 +5,7 @@ $| = 1; # flush stdout $ENV{LC_ALL} = 'C'; # Forge English error messages. $ENV{LANGUAGE} = 'C'; # Ditto in GNU. -if ($^O eq 'MSWin32') { +if ($^O eq 'MSWin32' || $^O eq 'NetWare') { # XXX the system tests could be written to use ./perl and so work on Win32 print "1..0 # Skip: shh, win32\n"; exit(0); diff --git a/t/op/fork.t b/t/op/fork.t index fbcd0987fe..b3faa19aa7 100755 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -7,7 +7,7 @@ BEGIN { @INC = '../lib'; require Config; import Config; unless ($Config{'d_fork'} - or ($^O eq 'MSWin32' and $Config{useithreads} + or (($^O eq 'MSWin32' || $^O eq 'NetWare') and $Config{useithreads} and $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ # and !defined $Config{'useperlio'} )) @@ -33,7 +33,7 @@ $tmpfile = "forktmp000"; 1 while -f ++$tmpfile; END { close TEST; unlink $tmpfile if $tmpfile; } -$CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : 'cat'); +$CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : (($^O eq 'NetWare') ? 'perl -e "print <>"' : 'cat')); for (@prgs){ my $switch; @@ -51,6 +51,9 @@ for (@prgs){ if ($^O eq 'MSWin32') { $results = `.\\perl -I../lib $switch $tmpfile 2>&1`; } + elsif ($^O eq 'NetWare') { + $results = `perl -I../lib $switch $tmpfile 2>&1`; + } else { $results = `./perl $switch $tmpfile 2>&1`; } @@ -255,7 +258,7 @@ ok 1 child $| = 1; $\ = "\n"; my $getenv; -if ($^O eq 'MSWin32') { +if ($^O eq 'MSWin32' || $^O eq 'NetWare') { $getenv = qq[$^X -e "print \$ENV{TST}"]; } else { diff --git a/t/op/goto.t b/t/op/goto.t index 579e8180e4..a0b4d55e74 100755 --- a/t/op/goto.t +++ b/t/op/goto.t @@ -29,7 +29,7 @@ label4: print "#2\t:$foo: == 4\n"; if ($foo == 4) {print "ok 2\n";} else {print "not ok 2\n";} -$PERL = ($^O eq 'MSWin32') ? '.\perl' : ($^O eq 'MacOS') ? $^X : './perl'; +$PERL = ($^O eq 'MSWin32') ? '.\perl' : ($^O eq 'MacOS') ? $^X : ($^O eq 'NetWare') ? 'perl' : './perl'; $CMD = qq[$PERL -e "goto foo;" 2>&1 ]; $x = `$CMD`; diff --git a/t/op/groups.t b/t/op/groups.t index 082d2d1d9f..0531826dba 100755 --- a/t/op/groups.t +++ b/t/op/groups.t @@ -10,7 +10,7 @@ sub quit { exit 0; } -quit() if $^O eq 'MSWin32' or $^O =~ /lynxos/i; +quit() if (($^O eq 'MSWin32' || $^O eq 'NetWare') or $^O =~ /lynxos/i); # We have to find a command that prints all (effective # and real) group names (not ids). The known commands are: diff --git a/t/op/lfs.t b/t/op/lfs.t index 44a92c4855..2652555281 100644 --- a/t/op/lfs.t +++ b/t/op/lfs.t @@ -59,7 +59,7 @@ $| = 1; print "# checking whether we have sparse files...\n"; # Known have-nots. -if ($^O eq 'MSWin32' || $^O eq 'VMS') { +if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') { print "1..0 # Skip: no sparse files in $^O\n"; bye(); } diff --git a/t/op/magic.t b/t/op/magic.t index c8b2d1c7bf..935e574990 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -21,11 +21,12 @@ sub ok { } $Is_MSWin32 = $^O eq 'MSWin32'; +$Is_NetWare = $^O eq 'NetWare'; $Is_VMS = $^O eq 'VMS'; $Is_Dos = $^O eq 'dos'; $Is_os2 = $^O eq 'os2'; $Is_Cygwin = $^O eq 'cygwin'; -$PERL = ($Is_MSWin32 ? '.\perl' : './perl'); +$PERL = ($Is_MSWin32 ? '.\perl' : ($Is_NetWare ? 'perl' : './perl')); print "1..41\n"; @@ -39,7 +40,7 @@ open(FOO,'ajslkdfpqjsjfk'); ok 2, $!, $!; close FOO; # just mention it, squelch used-only-once -if ($Is_MSWin32 || $Is_Dos) { +if ($Is_MSWin32 || $Is_NetWare || $Is_Dos) { ok "3 # skipped",1; ok "4 # skipped",1; } @@ -211,7 +212,7 @@ else { # test case-insignificance of %ENV (these tests must be enabled only # when perl is compiled with -DENV_IS_CASELESS) -if ($Is_MSWin32) { +if ($Is_MSWin32 || $Is_NetWare) { %ENV = (); $ENV{'Foo'} = 'bar'; $ENV{'fOo'} = 'baz'; diff --git a/t/op/misc.t b/t/op/misc.t index 679dd91d0d..b00f4b1b74 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -17,7 +17,7 @@ $tmpfile = "misctmp000"; 1 while -f ++$tmpfile; END { while($tmpfile && unlink $tmpfile){} } -$CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : 'cat'); +$CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : (($^O eq 'NetWare') ? 'perl -e "print <>"' : 'cat')); for (@prgs){ my $switch; @@ -35,6 +35,9 @@ for (@prgs){ if ($^O eq 'MSWin32') { $results = `.\\perl -I../lib $switch $tmpfile 2>&1`; } + elsif ($^O eq 'NetWare') { + $results = `perl -I../lib $switch $tmpfile 2>&1`; + } else { $results = `./perl $switch $tmpfile 2>&1`; } @@ -624,7 +627,7 @@ my $have_setlocale = $Config{d_setlocale} eq 'define'; $have_setlocale = 0 if $@; # Visual C's CRT goes silly on strings of the form "en_US.ISO8859-1" # and mingw32 uses said silly CRT -$have_setlocale = 0 if $^O eq 'MSWin32' && $Config{cc} =~ /^(cl|gcc)/i; +$have_setlocale = 0 if (($^O eq 'MSWin32' || $^O eq 'NetWare') && $Config{cc} =~ /^(cl|gcc)/i); exit(0) unless $have_setlocale; my @locales; if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) { diff --git a/t/op/rand.t b/t/op/rand.t index 83186aeb66..e365e597b4 100755 --- a/t/op/rand.t +++ b/t/op/rand.t @@ -342,6 +342,7 @@ AUTOSRAND: for (1..5) { my $PERL = (($^O eq 'VMS') ? "MCR $^X" : ($^O eq 'MSWin32') ? '.\perl' + : ($^O eq 'NetWare') ? 'perl' : './perl'); $pid = open PERL, qq[$PERL -e "print rand"|]; die "Couldn't pipe from perl: $!" unless defined $pid; diff --git a/t/op/runlevel.t b/t/op/runlevel.t index 3140f02103..136480129b 100755 --- a/t/op/runlevel.t +++ b/t/op/runlevel.t @@ -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+$//; diff --git a/t/op/split.t b/t/op/split.t index 4e3e546c18..8aa91e506f 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -51,6 +51,7 @@ print $_ eq '1:2:3:4:5:6:::' ? "ok 10\n" : "not ok 10 $_\n"; # Does assignment to a list imply split to one more field than that? if ($^O eq 'MSWin32') { $foo = `.\\perl -D1024 -e "(\$a,\$b) = split;" 2>&1` } +elsif ($^O eq 'NetWare') { $foo = `perl -D1024 -e "(\$a,\$b) = split;" 2>&1` } elsif ($^O eq 'VMS') { $foo = `./perl "-D1024" -e "(\$a,\$b) = split;" 2>&1` } elsif ($^O eq 'MacOS'){ $foo = `$^X "-D1024" -e "(\$a,\$b) = split;"` } else { $foo = `./perl -D1024 -e '(\$a,\$b) = split;' 2>&1` } diff --git a/t/op/stat.t b/t/op/stat.t index f7a2a4ec8d..f3cf2efbd6 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -12,17 +12,18 @@ use Config; print "1..58\n"; $Is_MSWin32 = $^O eq 'MSWin32'; +$Is_NetWare = $^O eq 'NetWare'; $Is_Dos = $^O eq 'dos'; -$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32; +$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32 || $Is_NetWare; $Is_Cygwin = $^O eq 'cygwin'; -chop($cwd = ($Is_MSWin32 ? `cd` : `pwd`)); +chop($cwd = (($Is_MSWin32 || $Is_NetWare) ? `cd` : `pwd`)); $DEV = `ls -l /dev` unless $Is_Dosish or $Is_Cygwin; unlink "Op.stat.tmp"; if (open(FOO, ">Op.stat.tmp")) { # hack to make Apollo update link count: - $junk = `ls Op.stat.tmp` unless ($Is_MSWin32 || $Is_Dos); + $junk = `ls Op.stat.tmp` unless ($Is_MSWin32 || $Is_NetWare || $Is_Dos); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat(FOO); @@ -32,7 +33,7 @@ if (open(FOO, ">Op.stat.tmp")) { else { print "# res=$res, nlink=$nlink.\nnot ok 1\n"; } - if ($Is_MSWin32 or $Is_Cygwin or $Is_Dos || ($mtime && $mtime == $ctime)) { + if ($Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos || ($mtime && $mtime == $ctime)) { print "ok 2\n"; } else { @@ -85,7 +86,7 @@ else { print "#4 :$mtime: should != :$ctime:\n"; unlink "Op.stat.tmp" or print "# unlink failed: $!\n"; -if ($Is_MSWin32) { open F, '>Op.stat.tmp' and close F } +if ($Is_MSWin32 || $Is_NetWare) { open F, '>Op.stat.tmp' and close F } else { `touch Op.stat.tmp` } if (-z 'Op.stat.tmp') {print "ok 5\n";} else {print "not ok 5\n";} @@ -141,7 +142,7 @@ if (-e 'Op.stat.tmp') {print "ok 27\n";} else {print "not ok 27\n";} unlink 'Op.stat.tmp2'; if (! -e 'Op.stat.tmp2') {print "ok 28\n";} else {print "not ok 28\n";} -if ($Is_MSWin32 || $Is_Dos) +if ($Is_MSWin32 || $Is_NetWare || $Is_Dos) {print "ok 29\n";} elsif ($DEV !~ /\nc.* (\S+)\n/) {print "ok 29\n";} @@ -151,7 +152,7 @@ else {print "not ok 29\n";} if (! -c '.') {print "ok 30\n";} else {print "not ok 30\n";} -if ($Is_MSWin32 || $Is_Dos) +if ($Is_MSWin32 || $Is_NetWare || $Is_Dos) {print "ok 31\n";} elsif ($DEV !~ /\ns.* (\S+)\n/) {print "ok 31\n";} @@ -161,7 +162,7 @@ else {print "not ok 31\n";} if (! -S '.') {print "ok 32\n";} else {print "not ok 32\n";} -if ($Is_MSWin32 || $Is_Dos) +if ($Is_MSWin32 || $Is_NetWare || $Is_Dos) {print "ok 33\n";} elsif ($DEV !~ /\nb.* (\S+)\n/) {print "ok 33\n";} @@ -205,7 +206,7 @@ tty_test: # may not be available (at, cron rsh etc), the PERL_SKIP_TTY_TEST env var # can be set to skip the tests that need a tty. unless($ENV{PERL_SKIP_TTY_TEST}) { - if ($Is_MSWin32) { + if ($Is_MSWin32 || $Is_NetWare) { print "ok 36\n"; print "ok 37\n"; } @@ -236,7 +237,7 @@ else { print "ok 39\n"; } open(null,"/dev/null"); -if (! -t null || -e '/xenix' || $^O eq 'machten' || $Is_MSWin32) +if (! -t null || -e '/xenix' || $^O eq 'machten' || $Is_MSWin32 || $Is_NetWare) {print "ok 40\n";} else {print "not ok 40\n";} close(null); diff --git a/t/op/sysio.t b/t/op/sysio.t index e43f850154..251c7f8151 100755 --- a/t/op/sysio.t +++ b/t/op/sysio.t @@ -6,7 +6,7 @@ chdir('op') || chdir('t/op') || die "sysio.t: cannot look for myself: $!"; open(I, 'sysio.t') || die "sysio.t: cannot find myself: $!"; -$reopen = ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos' || +$reopen = ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'mpeix'); $x = 'abc'; diff --git a/t/op/taint.t b/t/op/taint.t index 0d1e747daf..c2bb2f8705 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -40,9 +40,11 @@ BEGIN { my $Is_VMS = $^O eq 'VMS'; my $Is_MSWin32 = $^O eq 'MSWin32'; +my $Is_NetWare = $^O eq 'NetWare'; my $Is_Dos = $^O eq 'dos'; my $Invoke_Perl = $Is_VMS ? 'MCR Sys$Disk:[]Perl.' : - $Is_MSWin32 ? '.\perl' : './perl'; + ($Is_MSWin32 ? '.\perl' : + ($Is_NetWare ? 'perl' : './perl')); my @MoreEnv = qw/IFS CDPATH ENV BASH_ENV/; if ($Is_VMS) { @@ -99,7 +101,7 @@ sub test ($$;$) { } # We need an external program to call. -my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : "./echo$$"); +my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : ($Is_NetWare ? "echo$$" : "./echo$$")); END { unlink $ECHO } open PROG, "> $ECHO" or die "Can't create $ECHO: $!"; print PROG 'print "@ARGV\n"', "\n"; @@ -120,7 +122,7 @@ print "1..174\n"; test 1, eval { `$echo 1` } eq "1\n"; - if ($Is_MSWin32 || $Is_VMS || $Is_Dos) { + if ($Is_MSWin32 || $Is_NetWare || $Is_VMS || $Is_Dos) { print "# Environment tainting tests skipped\n"; for (2..5) { print "ok $_\n" } } @@ -144,7 +146,7 @@ print "1..174\n"; } my $tmp; - if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32 || $Is_Dos) { + if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32 || $Is_NetWare || $Is_Dos) { print "# all directories are writeable\n"; } else { diff --git a/t/op/write.t b/t/op/write.t index 8e4cca8fdc..28309748d1 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -7,8 +7,9 @@ BEGIN { print "1..44\n"; -my $CAT = ($^O eq 'MSWin32') ? 'type' - : ($^O eq 'MacOS') ? 'catenate' : 'cat'; +my $CAT = ($^O eq 'MSWin32' || $^O eq 'NetWare') ? 'type' + : ($^O eq 'MacOS') ? 'catenate' + : 'cat'; format OUT = the quick brown @<< |