diff options
Diffstat (limited to 't/pragma')
-rw-r--r-- | t/pragma/warn-doio | 4 | ||||
-rw-r--r-- | t/pragma/warn-mg | 3 | ||||
-rw-r--r-- | t/pragma/warn-op | 14 | ||||
-rw-r--r-- | t/pragma/warn-regexec | 8 |
4 files changed, 20 insertions, 9 deletions
diff --git a/t/pragma/warn-doio b/t/pragma/warn-doio index 0efa4c662c..af14f42272 100644 --- a/t/pragma/warn-doio +++ b/t/pragma/warn-doio @@ -38,7 +38,7 @@ __END__ # doio.c use warning 'io' ; -open(F, "|true|") +open(F, "|$^X -e 1|") EXPECT Can't do bidirectional pipe at - line 3. ######## @@ -83,7 +83,7 @@ Unsuccessful stat on filename containing newline at - line 4. ######## # doio.c use warning 'io' ; -exec "lskdjfalksdjfdjfkls" ; +exec "lskdjfalksdjfdjfkls","" ; EXPECT Can't exec "lskdjfalksdjfdjfkls": No such file or directory at - line 3. ######## diff --git a/t/pragma/warn-mg b/t/pragma/warn-mg index f414cb3e80..44e7634952 100644 --- a/t/pragma/warn-mg +++ b/t/pragma/warn-mg @@ -16,6 +16,9 @@ No such signal: SIGFRED at - line 3. ######## # mg.c use warning 'signal' ; +if ($^O eq 'MSWin32') { + print "SKIPPED\n# win32, can't kill() to raise()\n"; exit; +} $|=1; $SIG{"INT"} = "fred"; kill "INT",$$; EXPECT diff --git a/t/pragma/warn-op b/t/pragma/warn-op index 8ca6a5fd1f..d0886edf58 100644 --- a/t/pragma/warn-op +++ b/t/pragma/warn-op @@ -185,10 +185,10 @@ readlink 1; # OP_READLINK time ; # OP_TIME localtime ; # OP_LOCALTIME gmtime ; # OP_GMTIME -getgrnam 1; # OP_GGRNAM -getgrgid 1 ; # OP_GGRGID -getpwnam 1; # OP_GPWNAM -getpwuid 1; # OP_GPWUID +eval { getgrnam 1 }; # OP_GGRNAM +eval { getgrgid 1 }; # OP_GGRGID +eval { getpwnam 1 }; # OP_GPWNAM +eval { getpwuid 1 }; # OP_GPWUID EXPECT Useless use of repeat in void context at - line 3. Useless use of wantarray in void context at - line 5. @@ -361,6 +361,10 @@ getprotoent ; # OP_GPROTOENT getservbyname 1,2; # OP_GSBYNAME getservbyport 1,2; # OP_GSBYPORT getservent ; # OP_GSERVENT +INIT { + # some functions may not be there, so we exit without running + exit; +} EXPECT Useless use of getsockname in void context at - line 24. Useless use of getpeername in void context at - line 25. @@ -528,7 +532,7 @@ Hash %FRED missing the % in argument 1 of keys() at - line 3. ######## # op.c use warning 'syntax' ; -exec "true" ; +exec "$^X -e 1" ; my $a EXPECT Statement unlikely to be reached at - line 4. diff --git a/t/pragma/warn-regexec b/t/pragma/warn-regexec index 5ca776f9c1..158a7538ae 100644 --- a/t/pragma/warn-regexec +++ b/t/pragma/warn-regexec @@ -10,6 +10,8 @@ __END__ # regexec.c use warning 'unsafe' ; +print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit + if $^O eq 'MSWin32'; $_ = 'a' x (2**15+1); /^()(a\1)*$/ ; # @@ -28,10 +30,12 @@ $_ = 'a' x (2**15+1); # % limit stacksize 16000 # EXPECT -Complex regular subexpression recursion limit (32766) exceeded at - line 4. +Complex regular subexpression recursion limit (32766) exceeded at - line 6. ######## # regexec.c use warning 'unsafe' ; +print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit + if $^O eq 'MSWin32'; $_ = 'a' x (2**15+1); /^()(a\1)*?$/ ; # @@ -50,4 +54,4 @@ $_ = 'a' x (2**15+1); # % limit stacksize 16000 # EXPECT -Complex regular subexpression recursion limit (32766) exceeded at - line 4. +Complex regular subexpression recursion limit (32766) exceeded at - line 6. |