summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshell/common/tests/attributes.sh
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Oracle.COM>2010-04-03 09:48:44 -0700
committerRoger A. Faulkner <Roger.Faulkner@Oracle.COM>2010-04-03 09:48:44 -0700
commit3e14f97f673e8a630f076077de35afdd43dc1587 (patch)
tree9828b6b676f58d7b27dd28e00202d3f3461a5cd8 /usr/src/lib/libshell/common/tests/attributes.sh
parent4f60987df4dcaa54a88b596f861fbf4f3382c65e (diff)
downloadillumos-gate-3e14f97f673e8a630f076077de35afdd43dc1587.tar.gz
6939349 RFE: Update ksh93 to ast-ksh.2010-03-09
6877392 ksh93 regresses 'uniq -c' performance 6887363 Korn shell 93 sometimes mishandles return value of its child process 6900314 (while true ; do true|true ; done) hang in ioctl() with SIGTTOU 6904557 wc no longer counts number of bytes correctly 6904575 cut -d with multibyte character no longer works 6904597 paste -d no longer works with multibyte characters 6904780 /usr/bin/cksum changed output in snv_128 6904870 uniq -s does not skip multibyte characters correctly 6904878 join -t no longer works with multibyte char separator 6907460 EXIT trap handlers are sometimes executed twice 6909579 libast getopt solaris compatibility broken 6920072 ksh93 tail -f, with unconditional .25s sleep and line parsing, about 37x slower than cat 6932124 mktemp in ksh93 is broken Contributed by Olga Kryzhanovska <olga.kryzhanovska@gmail.com>
Diffstat (limited to 'usr/src/lib/libshell/common/tests/attributes.sh')
-rw-r--r--usr/src/lib/libshell/common/tests/attributes.sh38
1 files changed, 37 insertions, 1 deletions
diff --git a/usr/src/lib/libshell/common/tests/attributes.sh b/usr/src/lib/libshell/common/tests/attributes.sh
index 474972c03b..da6c2292d0 100644
--- a/usr/src/lib/libshell/common/tests/attributes.sh
+++ b/usr/src/lib/libshell/common/tests/attributes.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -324,4 +324,40 @@ unset foo
$SHELL 2> /dev/null -c 'export foo=(bar=3)' && err_exit 'compound variables cannot be exported'
+$SHELL -c 'builtin date' >/dev/null 2>&1 &&
+{
+
+# check env var changes against a builtin that uses the env var
+
+SEC=1234252800
+ETZ=EST5EDT
+EDT=03
+PTZ=PST8PDT
+PDT=00
+
+CMD="date -f%H \\#$SEC"
+
+export TZ=$ETZ
+
+set -- \
+ "$EDT $PDT $EDT" "" "TZ=$PTZ" "" \
+ "$EDT $PDT $EDT" "" "TZ=$PTZ" "TZ=$ETZ" \
+ "$EDT $PDT $EDT" "TZ=$ETZ" "TZ=$PTZ" "TZ=$ETZ" \
+ "$PDT $EDT $PDT" "TZ=$PTZ" "" "TZ=$PTZ" \
+ "$PDT $EDT $PDT" "TZ=$PTZ" "TZ=$ETZ" "TZ=$PTZ" \
+ "$EDT $PDT $EDT" "foo=bar" "TZ=$PTZ" "TZ=$ETZ" \
+
+while (( $# >= 4 ))
+do exp=$1
+ got=$(print $($SHELL -c "builtin date; $2 $CMD; $3 $CMD; $4 $CMD"))
+ [[ $got == $exp ]] || err_exit "[ '$2' '$3' '$4' ] env sequence failed -- expected '$exp', got '$got'"
+ shift 4
+done
+
+}
+
+unset v
+typeset -H v=/dev/null
+[[ $v == *nul* ]] || err_exit 'typeset -H for /dev/null not working'
+
exit $((Errors))