diff options
author | Denys Vlasenko | 2016-10-02 17:39:31 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-10-02 17:39:31 +0200 |
commit | 5d6b8729ed7335c702022f4f3176573f4cf2cf5a (patch) | |
tree | bef985dae4fb3ea41e1a478a848d19039b0e5d8f /shell/hush_test/hush-misc | |
parent | 888527cceec2f58f1eae3acceddee928b5cb647a (diff) | |
download | busybox-5d6b8729ed7335c702022f4f3176573f4cf2cf5a.zip busybox-5d6b8729ed7335c702022f4f3176573f4cf2cf5a.tar.gz |
hush testsuite: add many tests from ash testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r-- | shell/hush_test/hush-misc/heredoc4.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/heredoc4.tests | 3 | ||||
-rw-r--r-- | shell/hush_test/hush-misc/last_amp.right | 2 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/last_amp.tests | 8 | ||||
-rw-r--r-- | shell/hush_test/hush-misc/local1.right | 4 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/local1.tests | 11 | ||||
-rw-r--r-- | shell/hush_test/hush-misc/nulltick1.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/nulltick1.tests | 3 |
8 files changed, 35 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/heredoc4.right b/shell/hush_test/hush-misc/heredoc4.right new file mode 100644 index 0000000..371b092 --- /dev/null +++ b/shell/hush_test/hush-misc/heredoc4.right @@ -0,0 +1 @@ +'$' diff --git a/shell/hush_test/hush-misc/heredoc4.tests b/shell/hush_test/hush-misc/heredoc4.tests new file mode 100755 index 0000000..642ddb3 --- /dev/null +++ b/shell/hush_test/hush-misc/heredoc4.tests @@ -0,0 +1,3 @@ +cat <<EOF +'$' +EOF diff --git a/shell/hush_test/hush-misc/last_amp.right b/shell/hush_test/hush-misc/last_amp.right new file mode 100644 index 0000000..3da21ae --- /dev/null +++ b/shell/hush_test/hush-misc/last_amp.right @@ -0,0 +1,2 @@ +3 +End diff --git a/shell/hush_test/hush-misc/last_amp.tests b/shell/hush_test/hush-misc/last_amp.tests new file mode 100755 index 0000000..1609376 --- /dev/null +++ b/shell/hush_test/hush-misc/last_amp.tests @@ -0,0 +1,8 @@ +$THIS_SH -c 'echo 3&' +d=`date` +while test "`date`" = "$d"; do true; done +d1=`date` +$THIS_SH -c 'sleep 1&' +d2=`date` +test "$d1" = "$d2" || echo BAD +echo End diff --git a/shell/hush_test/hush-misc/local1.right b/shell/hush_test/hush-misc/local1.right new file mode 100644 index 0000000..a2d121d --- /dev/null +++ b/shell/hush_test/hush-misc/local1.right @@ -0,0 +1,4 @@ +A1:'A' +A2:'' +A3:'' +A4:'A' diff --git a/shell/hush_test/hush-misc/local1.tests b/shell/hush_test/hush-misc/local1.tests new file mode 100755 index 0000000..b1e6750 --- /dev/null +++ b/shell/hush_test/hush-misc/local1.tests @@ -0,0 +1,11 @@ +a=A +f() { + local a + # the above line unsets $a + echo "A2:'$a'" + unset a + echo "A3:'$a'" +} +echo "A1:'$a'" +f +echo "A4:'$a'" diff --git a/shell/hush_test/hush-misc/nulltick1.right b/shell/hush_test/hush-misc/nulltick1.right new file mode 100644 index 0000000..f90b820 --- /dev/null +++ b/shell/hush_test/hush-misc/nulltick1.right @@ -0,0 +1,3 @@ +Test 1 +Test 2 +Done diff --git a/shell/hush_test/hush-misc/nulltick1.tests b/shell/hush_test/hush-misc/nulltick1.tests new file mode 100755 index 0000000..f81923d --- /dev/null +++ b/shell/hush_test/hush-misc/nulltick1.tests @@ -0,0 +1,3 @@ +echo Test ` ` 1 +echo Test `</dev/null` 2 +echo Done |