aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test')
-rw-r--r--shell/ash_test/ash-arith/arith-ternary1.right3
-rwxr-xr-xshell/ash_test/ash-arith/arith-ternary1.tests7
-rw-r--r--shell/ash_test/ash-arith/arith-ternary2.right4
-rwxr-xr-xshell/ash_test/ash-arith/arith-ternary2.tests7
-rw-r--r--shell/ash_test/ash-arith/arith-ternary_nested.right1
-rwxr-xr-xshell/ash_test/ash-arith/arith-ternary_nested.tests2
6 files changed, 12 insertions, 12 deletions
diff --git a/shell/ash_test/ash-arith/arith-ternary1.right b/shell/ash_test/ash-arith/arith-ternary1.right
index c968f1181..6b751d7b8 100644
--- a/shell/ash_test/ash-arith/arith-ternary1.right
+++ b/shell/ash_test/ash-arith/arith-ternary1.right
@@ -1,5 +1,2 @@
142:42 142:42
2a=0 2a=0
36:6
4a=b=+err+
5b=6
diff --git a/shell/ash_test/ash-arith/arith-ternary1.tests b/shell/ash_test/ash-arith/arith-ternary1.tests
index 5a54e34b6..3532ce54d 100755
--- a/shell/ash_test/ash-arith/arith-ternary1.tests
+++ b/shell/ash_test/ash-arith/arith-ternary1.tests
@@ -3,10 +3,3 @@ a=0
3# The not-taken branch should not evaluate 3# The not-taken branch should not evaluate
4echo 42:$((1 ? 42 : (a+=2))) 4echo 42:$((1 ? 42 : (a+=2)))
5echo "a=$a" 5echo "a=$a"
6
7a='b=+err+'
8b=5
9# The not-taken branch should not even parse variables
10echo 6:$((0 ? a : ++b))
11echo "a=$a"
12echo "b=$b"
diff --git a/shell/ash_test/ash-arith/arith-ternary2.right b/shell/ash_test/ash-arith/arith-ternary2.right
index aa54bd925..a549b1b5c 100644
--- a/shell/ash_test/ash-arith/arith-ternary2.right
+++ b/shell/ash_test/ash-arith/arith-ternary2.right
@@ -1 +1,3 @@
15:5 16:6
2a=b=+err+
3b=6
diff --git a/shell/ash_test/ash-arith/arith-ternary2.tests b/shell/ash_test/ash-arith/arith-ternary2.tests
index eefc8e7ce..cb3163932 100755
--- a/shell/ash_test/ash-arith/arith-ternary2.tests
+++ b/shell/ash_test/ash-arith/arith-ternary2.tests
@@ -1,2 +1,7 @@
1exec 2>&1 1exec 2>&1
2echo 5:$((1?2?3?4?5:6:7:8:9)) 2a='b=+err+'
3b=5
4# The not-taken branch should not parse variables
5echo 6:$((0 ? a : ++b))
6echo "a=$a"
7echo "b=$b"
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested.right b/shell/ash_test/ash-arith/arith-ternary_nested.right
new file mode 100644
index 000000000..aa54bd925
--- /dev/null
+++ b/shell/ash_test/ash-arith/arith-ternary_nested.right
@@ -0,0 +1 @@
5:5
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested.tests b/shell/ash_test/ash-arith/arith-ternary_nested.tests
new file mode 100755
index 000000000..eefc8e7ce
--- /dev/null
+++ b/shell/ash_test/ash-arith/arith-ternary_nested.tests
@@ -0,0 +1,2 @@
1exec 2>&1
2echo 5:$((1?2?3?4?5:6:7:8:9))