2010-11-01 08:55:26 +00:00
diff -up ksh-20101026/src/cmd/ksh93/tests/builtins.sh.fixregr ksh-20101026/src/cmd/ksh93/tests/builtins.sh
--- ksh-20101026/src/cmd/ksh93/tests/builtins.sh.fixregr 2010-10-27 08:52:38.000000000 +0200
+++ ksh-20101026/src/cmd/ksh93/tests/builtins.sh 2010-11-01 08:49:42.135892758 +0100
2010-10-08 18:20:36 +00:00
@@ -293,7 +293,7 @@ fi
# we won't get hit by the one second boundary twice, right?
[[ $(printf '%T\n' now) == "$(date)" ]] ||
[[ $(printf '%T\n' now) == "$(date)" ]] ||
-err_exit 'printf "%T" now'
+err_exit 'printf "%T" now'"$(printf '%T\n' now) != $(date)"
behead()
2010-08-30 17:39:15 +00:00
{
2010-10-08 18:20:36 +00:00
read line
2010-11-01 08:55:26 +00:00
diff -up ksh-20101026/src/cmd/ksh93/tests/locale.sh.fixregr ksh-20101026/src/cmd/ksh93/tests/locale.sh
--- ksh-20101026/src/cmd/ksh93/tests/locale.sh.fixregr 2010-10-26 12:12:34.000000000 +0200
+++ ksh-20101026/src/cmd/ksh93/tests/locale.sh 2010-11-01 09:37:38.719975976 +0100
@@ -105,6 +105,7 @@ if (( $($SHELL -c $'export LC_ALL='$loca
2010-10-08 18:20:36 +00:00
then LC_ALL=$locale $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
fi
+locale=en_US.UTF-8
2010-08-30 17:39:15 +00:00
#$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
exp="6 2 6"
2010-11-01 08:55:26 +00:00
@@ -112,11 +113,11 @@ set -- $($SHELL -c "
2010-08-30 17:39:15 +00:00
unset LC_CTYPE
export LANG=$locale
2010-10-08 18:20:36 +00:00
export LC_ALL=C
- command wc -C < $tmp/two_euro_chars.txt
+ command wc -m < $tmp/two_euro_chars.txt
unset LC_ALL
- command wc -C < $tmp/two_euro_chars.txt
+ command wc -m < $tmp/two_euro_chars.txt
export LC_ALL=C
- command wc -C < $tmp/two_euro_chars.txt
+ command wc -m < $tmp/two_euro_chars.txt
2010-08-30 17:39:15 +00:00
")
got=$*
[[ $got == $exp ]] || err_exit "command wc LC_ALL default failed -- expected '$exp', got '$got'"
2010-11-01 08:55:26 +00:00
@@ -135,6 +136,8 @@ set -- $($SHELL -c "
2010-08-30 17:39:15 +00:00
got=$*
[[ $got == $exp ]] || err_exit "builtin wc LC_ALL default failed -- expected '$exp', got '$got'"
2010-10-08 18:20:36 +00:00
+locale=C_EU.UTF-8
+
2010-08-30 17:39:15 +00:00
# multibyte char straddling buffer boundary
{
2010-11-01 08:55:26 +00:00
@@ -191,6 +194,7 @@ do exp=$1
2010-10-08 18:20:36 +00:00
done
2010-08-30 17:39:15 +00:00
2010-10-08 18:20:36 +00:00
# setocale(LC_ALL,"") after setlocale() initialization
+locale=en_US.UTF-8
2010-08-30 17:39:15 +00:00
2010-10-08 18:20:36 +00:00
printf 'f1\357\274\240f2\n' > input1
printf 't2\357\274\240f1\n' > input2