1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

tests/basic.sh: fix test for BSD 'ps' (re: cefe087d)

This commit is contained in:
Martijn Dekker 2020-09-29 05:18:08 +02:00
parent 30aee65113
commit 90941717da

View file

@ -708,6 +708,7 @@ then expect='./atest 1 2'
./atest 1 2 &
actual=$(UNIX95=1 ps -o args= -p "$!")
kill "$!"
[[ $actual =~ \(.*\)$ ]] && actual=${actual%\(*} # BSD 'ps' adds " (ksh)"
while [[ $actual == [[:space:]]* ]]; do actual=${actual#?}; done
while [[ $actual == *[[:space:]] ]]; do actual=${actual%?}; done
[[ $actual == "$expect" ]] || err_exit "ksh didn't rewrite argv correctly" \