[git commit] shell: update psubst testcases
Denys Vlasenko
vda.linux at googlemail.com
Tue Jul 27 02:20:32 UTC 2021
commit: https://git.busybox.net/busybox/commit/?id=c450437a4e631378cd6a2dc06a5923ce811a950d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash_test/ash-psubst/falsetick.right | 24 ++++++++++++++++++++++
.../ash-psubst}/falsetick.tests | 3 ---
shell/ash_test/ash-psubst/falsetick2.right | 1 +
shell/ash_test/ash-psubst/falsetick2.tests | 3 +++
shell/hush_test/hush-psubst/falsetick.right | 3 ---
shell/hush_test/hush-psubst/falsetick.tests | 3 ---
shell/hush_test/hush-psubst/falsetick3.right | 3 +++
shell/hush_test/hush-psubst/falsetick3.tests | 3 +++
8 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/shell/ash_test/ash-psubst/falsetick.right b/shell/ash_test/ash-psubst/falsetick.right
new file mode 100644
index 000000000..0335254a8
--- /dev/null
+++ b/shell/ash_test/ash-psubst/falsetick.right
@@ -0,0 +1,24 @@
+0
+0
+0
+0
+2
+2
+2
+2
+./falsetick.tests: line 12: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 13: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 14: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 15: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 16: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 17: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 18: can't create /does/not/exist: nonexistent directory
+1
+./falsetick.tests: line 19: can't create /does/not/exist: nonexistent directory
+1
diff --git a/shell/hush_test/hush-psubst/falsetick.tests b/shell/ash_test/ash-psubst/falsetick.tests
similarity index 85%
copy from shell/hush_test/hush-psubst/falsetick.tests
copy to shell/ash_test/ash-psubst/falsetick.tests
index 44d2eae8b..d2b93695e 100755
--- a/shell/hush_test/hush-psubst/falsetick.tests
+++ b/shell/ash_test/ash-psubst/falsetick.tests
@@ -17,6 +17,3 @@ true; a=`exit 2` >/does/not/exist; echo $?
false; a=`exit 2` >/does/not/exist; echo $?
true; a=$(exit 2) >/does/not/exist; echo $?
false; a=$(exit 2) >/does/not/exist; echo $?
-# ...and assignment still happens despite redirect error:
-true; a=$(echo b) >/does/not/exist; echo $?
-echo "Done: a=$a"
diff --git a/shell/ash_test/ash-psubst/falsetick2.right b/shell/ash_test/ash-psubst/falsetick2.right
new file mode 100644
index 000000000..670f560f1
--- /dev/null
+++ b/shell/ash_test/ash-psubst/falsetick2.right
@@ -0,0 +1 @@
+Two:2 v:[]
diff --git a/shell/ash_test/ash-psubst/falsetick2.tests b/shell/ash_test/ash-psubst/falsetick2.tests
new file mode 100755
index 000000000..cfbd1a5de
--- /dev/null
+++ b/shell/ash_test/ash-psubst/falsetick2.tests
@@ -0,0 +1,3 @@
+v=v
+v=`exit 2` `false`
+echo Two:$? v:"[$v]"
diff --git a/shell/hush_test/hush-psubst/falsetick.right b/shell/hush_test/hush-psubst/falsetick.right
index 0b98fb778..d2d1a2880 100644
--- a/shell/hush_test/hush-psubst/falsetick.right
+++ b/shell/hush_test/hush-psubst/falsetick.right
@@ -22,6 +22,3 @@ hush: can't open '/does/not/exist': No such file or directory
1
hush: can't open '/does/not/exist': No such file or directory
1
-hush: can't open '/does/not/exist': No such file or directory
-1
-Done: a=b
diff --git a/shell/hush_test/hush-psubst/falsetick.tests b/shell/hush_test/hush-psubst/falsetick.tests
index 44d2eae8b..d2b93695e 100755
--- a/shell/hush_test/hush-psubst/falsetick.tests
+++ b/shell/hush_test/hush-psubst/falsetick.tests
@@ -17,6 +17,3 @@ true; a=`exit 2` >/does/not/exist; echo $?
false; a=`exit 2` >/does/not/exist; echo $?
true; a=$(exit 2) >/does/not/exist; echo $?
false; a=$(exit 2) >/does/not/exist; echo $?
-# ...and assignment still happens despite redirect error:
-true; a=$(echo b) >/does/not/exist; echo $?
-echo "Done: a=$a"
diff --git a/shell/hush_test/hush-psubst/falsetick3.right b/shell/hush_test/hush-psubst/falsetick3.right
new file mode 100644
index 000000000..327849a31
--- /dev/null
+++ b/shell/hush_test/hush-psubst/falsetick3.right
@@ -0,0 +1,3 @@
+hush: can't open '/does/not/exist': No such file or directory
+1
+Done: a=b
diff --git a/shell/hush_test/hush-psubst/falsetick3.tests b/shell/hush_test/hush-psubst/falsetick3.tests
new file mode 100755
index 000000000..cd185335e
--- /dev/null
+++ b/shell/hush_test/hush-psubst/falsetick3.tests
@@ -0,0 +1,3 @@
+# assignment still happens despite redirect error
+true; a=$(echo b) >/does/not/exist; echo $?
+echo "Done: a=$a"
More information about the busybox-cvs
mailing list