1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

more regression test updates (re: 7cdb01f6)

This commit is contained in:
Martijn Dekker 2021-12-16 11:45:53 +01:00
parent fad16a0c63
commit 3779d84220
2 changed files with 44 additions and 38 deletions

View file

@ -1100,7 +1100,8 @@ got=$($SHELL -c 't=good; t=bad command -@; print $t' 2>/dev/null)
# ======
# Regression test for https://github.com/att/ast/issues/949
foo_script='#!/bin/sh
if (builtin chmod) 2>/dev/null
then foo_script='#!/bin/sh
exit 0'
echo "$foo_script" > "$tmp/foo1.sh"
echo "$foo_script" > "$tmp/foo2.sh"
@ -1108,6 +1109,7 @@ builtin chmod
chmod +x "$tmp/foo1.sh" "$tmp/foo2.sh"
$SHELL "$tmp/foo1.sh" || err_exit "builtin 'chmod +x' doesn't work on first script"
$SHELL "$tmp/foo2.sh" || err_exit "builtin 'chmod +x' doesn't work on second script"
fi
# ======
# In ksh93v- 2013-10-10 alpha cd doesn't fail on directories without execute permission.
@ -1208,7 +1210,8 @@ got=$(
# ======
# Test for bugs related to 'uname -d'
# https://github.com/att/ast/pull/1187
builtin uname
if (builtin uname) 2>/dev/null
then builtin uname
exp=$(uname -o)
# Test for a possible crash (to avoid crashing the script, fork the subshell)
@ -1221,6 +1224,7 @@ exp=$(uname -o)
got=$(ulimit -t unlimited 2> /dev/null; uname -d > /dev/null; uname -o)
[[ $exp == $got ]] || err_exit "'uname -d' changes the output of 'uname -o'" \
"(expected $(printf %q "$exp"), got $(printf %q "$got"))"
fi
# ======
# https://github.com/ksh93/ksh/issues/138

View file

@ -157,7 +157,8 @@ fi
#$SHELL -c 'export LANG='$locale'; printf "\u[20ac]\u[20ac]" > $tmp/two_euro_chars.txt'
printf $'\342\202\254\342\202\254' > $tmp/two_euro_chars.txt
if((SHOPT_MULTIBYTE)); then
if (builtin wc) 2>/dev/null
then if((SHOPT_MULTIBYTE)); then
exp="6 2 6"
else
exp="6 6 6"
@ -176,6 +177,7 @@ set -- $($SHELL -c "
")
got=$*
[[ $got == $exp ]] || err_exit "builtin wc LC_ALL default failed -- expected '$exp', got '$got'"
fi
# multibyte char straddling buffer boundary