mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
tests/locale.sh: remove unportable test with external 'wc' command
The -C flag to 'wc' is not portable; '-m' is the portable variant. However, this whole test is not appropriate here, as it tests the external 'wc' utility and not ksh's builtin version -- so any test failure represents a bug in the OS and not in ksh. src/cmd/ksh93/tests/locale.sh: - Remove test that counts two € (euro) character using the OS's external 'wc' utility. Keep the test that uses builtin 'wc'. (cherry picked from commit e1b25e0ace85ee6e62734fb236900fe069dccb6e)
This commit is contained in:
parent
2318de328a
commit
11226f9edd
1 changed files with 0 additions and 12 deletions
|
@ -113,18 +113,6 @@ fi
|
||||||
#$SHELL -c 'export LANG='$locale'; printf "\u[20ac]\u[20ac]" > $tmp/two_euro_chars.txt'
|
#$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
|
printf $'\342\202\254\342\202\254' > $tmp/two_euro_chars.txt
|
||||||
exp="6 2 6"
|
exp="6 2 6"
|
||||||
set -- $($SHELL -c "
|
|
||||||
unset LC_CTYPE
|
|
||||||
export LANG=$locale
|
|
||||||
export LC_ALL=C
|
|
||||||
command wc -C < $tmp/two_euro_chars.txt
|
|
||||||
unset LC_ALL
|
|
||||||
command wc -C < $tmp/two_euro_chars.txt
|
|
||||||
export LC_ALL=C
|
|
||||||
command wc -C < $tmp/two_euro_chars.txt
|
|
||||||
")
|
|
||||||
got=$*
|
|
||||||
[[ $got == $exp ]] || err_exit "command wc LC_ALL default failed -- expected '$exp', got '$got'"
|
|
||||||
set -- $($SHELL -c "
|
set -- $($SHELL -c "
|
||||||
if builtin wc 2>/dev/null || builtin -f cmd wc 2>/dev/null
|
if builtin wc 2>/dev/null || builtin -f cmd wc 2>/dev/null
|
||||||
then unset LC_CTYPE
|
then unset LC_CTYPE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue