commit bash-20120216 snapshot

This commit is contained in:
Chet Ramey
2012-03-05 21:16:53 -05:00
parent 7f947b6872
commit 1f6ec1a86f
37 changed files with 27234 additions and 28 deletions
+3
View File
@@ -187,3 +187,6 @@ declare -A foo='(["bar\\]bie"]="doll" )'
bar${foo}bie
doll
declare -A foo='(["bar\${foo}bie"]="doll" )'
bar
after printf
after use: 0
+2
View File
@@ -184,3 +184,5 @@ ${THIS_SH} ./assoc4.sub
${THIS_SH} ./assoc5.sub
${THIS_SH} ./assoc6.sub
${THIS_SH} ./assoc7.sub
+16
View File
@@ -0,0 +1,16 @@
# problem with bash versions through bash-4.2
foo()
{
declare -A hash
declare hash[baz]=bar #bash crashes here
echo ${hash[@]}
}
foo
declare -a ary
printf -v ary[0] "%b" ""
echo "after printf"
x="${ary[*]}" # segfaults here
echo "after use: $?"
+3
View File
@@ -4,3 +4,6 @@ and here
retest
and match
no more clauses
1.0
./case.tests: line 29: xx: readonly variable
1.1
+12
View File
@@ -16,3 +16,15 @@ esac
case a in
a) echo no more clauses;&
esac
x=0 y=1
case 1 in
$((y=0)) ) ;;
$((x=1)) ) ;&
$((x=2)) ) echo $x.$y ;;
esac
unset x
readonly xx=1
case 1 in $((xx++)) ) echo hi1 ;; *) echo hi2; esac
echo ${xx}.$?
+5 -1
View File
@@ -98,9 +98,13 @@ trap: usage: trap [-lp] [[arg] signal_spec ...]
./errors.tests: line 250: kill: `': not a pid or valid job spec
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
./errors.tests: line 255: set: trackall: invalid option name
./errors.tests: line 259: xx: readonly variable
1
./errors1.sub: line 1: .: -i: invalid option
.: usage: . filename [arguments]
./errors1.sub: line 9: shift: -4: shift count out of range
./errors1.sub: line 14: break: -1: loop count out of range
after f
./errors.tests: line 264: `!!': not a valid identifier
./errors2.sub: line 3: ${$NO_SUCH_VAR}: bad substitution
1
./errors.tests: line 270: `!!': not a valid identifier
+6
View File
@@ -254,7 +254,13 @@ kill -INT
# bad shell option names
set -o trackall # bash is not ksh
# problem with versions through bash-4.2
readonly xx=5
echo $((xx=5))
echo $?
${THIS_SH} ./errors1.sub
${THIS_SH} ./errors2.sub
# this must be last!
# in posix mode, a function name must be a valid identifier
+3
View File
@@ -0,0 +1,3 @@
set -e
trap 'echo $?' EXIT
echo ${$NO_SUCH_VAR} # Bad substitution expected here