summaryrefslogtreecommitdiff
path: root/tests/errors6.sub
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors6.sub')
-rw-r--r--tests/errors6.sub20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/errors6.sub b/tests/errors6.sub
new file mode 100644
index 00000000..930721ad
--- /dev/null
+++ b/tests/errors6.sub
@@ -0,0 +1,20 @@
+# problems with non-fatal expansion errors through bash-4.3
+: ${THIS_SH:=./bash}
+
+${THIS_SH} -c 'echo ${x!y} second
+echo after 1: $?'
+
+${THIS_SH} -c 'echo ${#+} second
+echo after 2: $?'
+
+${THIS_SH} -c 'echo ${#foo%} second
+echo after 3: $?'
+
+${THIS_SH} -c 'b[0]=4 ; echo ${b[ ]}
+echo array after 1: $?'
+${THIS_SH} -c 'typeset -A v ; v["0"]=one ; echo ${v[ ]}
+echo array after 2: $?'
+
+echo ${-3}
+x=-3; echo ${!x}
+echo after indir: $?