Use ; as a path separator on OS/2 when testing

This commit is contained in:
KO Myung-Hun
2015-05-16 13:16:13 +09:00
parent a1a8bd3f42
commit 431f250762
2 changed files with 86 additions and 20 deletions

View File

@ -280,6 +280,7 @@ foreach $env (('HOME', 'LD_LIBRARY_PATH', 'LOCPATH', 'LOGNAME',
} }
$new_env{'CYGWIN'} = 'nodosfilewarning'; $new_env{'CYGWIN'} = 'nodosfilewarning';
$new_env{'ENV'} = '/nonexistant'; $new_env{'ENV'} = '/nonexistant';
$new_env{'PATH_SEPARATOR'} = $os eq 'os2' ? ';' : ':';
if (($os eq 'VMS') || ($Config{perlpath} =~ m/$Config{_exe}$/i)) { if (($os eq 'VMS') || ($Config{perlpath} =~ m/$Config{_exe}$/i)) {
$new_env{'__perlname'} = $Config{perlpath}; $new_env{'__perlname'} = $Config{perlpath};
} else { } else {

105
check.t
View File

@ -232,7 +232,7 @@ time-limit: 3
stdin: stdin:
print '#!'"$__progname"'\necho tf' >lq print '#!'"$__progname"'\necho tf' >lq
chmod +x lq chmod +x lq
PATH=$PWD:$PATH PATH="$PWD$PATH_SEPARATOR$PATH"
alias lq=lq alias lq=lq
lq lq
echo = now echo = now
@ -5558,7 +5558,7 @@ description:
stdin: stdin:
print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \ print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \
'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \ 'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \
done >env; chmod +x env; PATH=.:$PATH done >env; chmod +x env; PATH=".$PATH_SEPARATOR$PATH"
foo=bar foo=bar
readonly foo readonly foo
foo=stuff env | grep '^foo' foo=stuff env | grep '^foo'
@ -6264,7 +6264,7 @@ description:
stdin: stdin:
print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \ print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \
'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \ 'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \
done >env; chmod +x env; PATH=.:$PATH done >env; chmod +x env; PATH=".$PATH_SEPARATOR$PATH"
FOO=bar exec env FOO=bar exec env
expected-stdout-pattern: expected-stdout-pattern:
/(^|.*\n)FOO=bar\n/ /(^|.*\n)FOO=bar\n/
@ -6276,7 +6276,7 @@ description:
stdin: stdin:
print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \ print '#!'"$__progname"'\nunset RANDOM\nexport | while IFS= read -r' \
'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \ 'RANDOM; do eval '\''print -r -- "$RANDOM=$'\''"$RANDOM"'\'\"\'\; \
done >env; chmod +x env; PATH=.:$PATH done >env; chmod +x env; PATH=".$PATH_SEPARATOR$PATH"
env >bar1 env >bar1
FOO=bar exec; env >bar2 FOO=bar exec; env >bar2
cmp -s bar1 bar2 cmp -s bar1 bar2
@ -6520,7 +6520,7 @@ stdin:
print '#!'"$__progname"'\nexec "$1"' >env print '#!'"$__progname"'\nexec "$1"' >env
print '#!'"$__progname"'\nexit 1' >false print '#!'"$__progname"'\nexit 1' >false
chmod +x env false chmod +x env false
PATH=.:$PATH PATH=".$PATH_SEPARATOR$PATH"
set -ex set -ex
env false && echo something env false && echo something
echo END echo END
@ -6538,7 +6538,7 @@ stdin:
print '#!'"$__progname"'\nexit 1' >false print '#!'"$__progname"'\nexit 1' >false
print '#!'"$__progname"'\nexit 0' >true print '#!'"$__progname"'\nexit 0' >true
chmod +x env false chmod +x env false
PATH=.:$PATH PATH=".$PATH_SEPARATOR$PATH"
set -ex set -ex
if env true; then if env true; then
env false && echo something env false && echo something
@ -7282,7 +7282,7 @@ stdin:
set -A anzahl -- foo/* set -A anzahl -- foo/*
echo got ${#anzahl[*]} files echo got ${#anzahl[*]} files
chmod +x foo/* chmod +x foo/*
export PATH=$(pwd)/foo:$PATH export PATH="$(pwd)/foo$PATH_SEPARATOR$PATH"
"$__progname" -c 'fnord' "$__progname" -c 'fnord'
echo = echo =
"$__progname" -c 'fnord; fnord; fnord; fnord' "$__progname" -c 'fnord; fnord; fnord; fnord'
@ -7467,14 +7467,14 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
stop='\kill -STOP' stop='\kill -STOP'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
name: aliases-1-hartz4 name: aliases-1-hartz4
description: description:
Check if built-in shell aliases are okay Check if built-in shell aliases are okay
category: android,arge category: android,arge,!os:os2
stdin: stdin:
alias alias
typeset -f typeset -f
@ -7489,7 +7489,28 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
type='\builtin whence -v'
---
name: aliases-1-hartz4-semi
description:
Check if built-in shell aliases are okay
category: os:os2
stdin:
alias
typeset -f
expected-stdout:
autoload='\typeset -fu'
functions='\typeset -f'
hash='\builtin alias -t'
history='\builtin fc -l'
integer='\typeset -i'
local='\typeset'
login='\exec login'
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH="$PATH;." \command .'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
name: aliases-2b name: aliases-2b
@ -7511,7 +7532,7 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
stop='\kill -STOP' stop='\kill -STOP'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
@ -7534,14 +7555,14 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
stop='\kill -STOP' stop='\kill -STOP'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
name: aliases-2b-hartz4 name: aliases-2b-hartz4
description: description:
Check if “set -o sh” does not influence built-in aliases Check if “set -o sh” does not influence built-in aliases
category: android,arge category: android,arge,!os:os2
arguments: !-o!sh! arguments: !-o!sh!
stdin: stdin:
alias alias
@ -7557,13 +7578,13 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
name: aliases-3b-hartz4 name: aliases-3b-hartz4
description: description:
Check if running as sh does not influence built-in aliases Check if running as sh does not influence built-in aliases
category: android,arge category: android,arge,!os:os2
stdin: stdin:
cp "$__progname" sh cp "$__progname" sh
./sh -c 'alias; typeset -f' ./sh -c 'alias; typeset -f'
@ -7579,7 +7600,51 @@ expected-stdout:
nameref='\typeset -n' nameref='\typeset -n'
nohup='nohup ' nohup='nohup '
r='\builtin fc -e -' r='\builtin fc -e -'
source='PATH=$PATH:. \command .' source='PATH="$PATH:." \command .'
type='\builtin whence -v'
---
name: aliases-2b-hartz4-semi
description:
Check if “set -o sh” does not influence built-in aliases
category: os:os2
arguments: !-o!sh!
stdin:
alias
typeset -f
expected-stdout:
autoload='\typeset -fu'
functions='\typeset -f'
hash='\builtin alias -t'
history='\builtin fc -l'
integer='\typeset -i'
local='\typeset'
login='\exec login'
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH="$PATH;." \command .'
type='\builtin whence -v'
---
name: aliases-3b-hartz4-semi
description:
Check if running as sh does not influence built-in aliases
category: os:os2
stdin:
cp "$__progname" sh
./sh -c 'alias; typeset -f'
rm -f sh
expected-stdout:
autoload='\typeset -fu'
functions='\typeset -f'
hash='\builtin alias -t'
history='\builtin fc -l'
integer='\typeset -i'
local='\typeset'
login='\exec login'
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH="$PATH;." \command .'
type='\builtin whence -v' type='\builtin whence -v'
--- ---
name: aliases-cmdline name: aliases-cmdline
@ -9900,7 +9965,7 @@ description:
FOO=bar f FOO=bar f
where f is a ksh style function, should not set FOO in the current where f is a ksh style function, should not set FOO in the current
env. If f is a Bourne style function, FOO should be set. Furthermore, env. If f is a Bourne style function, FOO should be set. Furthermore,
the function should receive a correct value of FOO. However, differing the function should receive a correct value of FOO. However, differing
from oksh, setting FOO in the function itself must change the value in from oksh, setting FOO in the function itself must change the value in
setting FOO in the function itself should not change the value in setting FOO in the function itself should not change the value in
global environment. global environment.
@ -10072,7 +10137,7 @@ description:
echo $x echo $x
expected-stdout: expected-stdout:
yes yes
--- ---
name: comsub-3 name: comsub-3
description: description:
Extended test for COMSUB explaining why a recursive parser Extended test for COMSUB explaining why a recursive parser
@ -11307,7 +11372,7 @@ file-setup: file 755 "!false"
description: description:
Check that '!' substitution in noninteractive mode is ignored Check that '!' substitution in noninteractive mode is ignored
file-setup: file 755 "falsetto" file-setup: file 755 "falsetto"
#! /bin/sh #! /bin/sh
echo molto bene echo molto bene
exit 42 exit 42
file-setup: file 755 "!false" file-setup: file 755 "!false"
@ -11337,7 +11402,7 @@ file-setup: file 755 "!false"
need-ctty: yes need-ctty: yes
arguments: !-i! arguments: !-i!
file-setup: file 755 "falsetto" file-setup: file 755 "falsetto"
#! /bin/sh #! /bin/sh
echo molto bene echo molto bene
exit 42 exit 42
file-setup: file 755 "!false" file-setup: file 755 "!false"