diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-02 17:55:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-02 17:55:51 +0200 |
commit | c4cf542c575068d55368e771abf6c358bfebf5d3 (patch) | |
tree | b916ff4bea0671437b80257fa82283ad8e09faab /shell/hush_test | |
parent | 1b73f8471a3694d2e6b035bb7f04e1f4df943f03 (diff) | |
download | busybox-w32-c4cf542c575068d55368e771abf6c358bfebf5d3.tar.gz busybox-w32-c4cf542c575068d55368e771abf6c358bfebf5d3.tar.bz2 busybox-w32-c4cf542c575068d55368e771abf6c358bfebf5d3.zip |
sh testsuite: create hush-redir/* and move files around
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-redir/redir1.right (renamed from shell/hush_test/hush-misc/redir1.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir1.tests (renamed from shell/hush_test/hush-misc/redir1.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir2.right (renamed from shell/hush_test/hush-misc/redir2.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir2.tests (renamed from shell/hush_test/hush-misc/redir2.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir3.right (renamed from shell/hush_test/hush-misc/redir3.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir3.tests (renamed from shell/hush_test/hush-misc/redir3.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir4.right (renamed from shell/hush_test/hush-misc/redir4.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir4.tests (renamed from shell/hush_test/hush-misc/redir4.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir5.right (renamed from shell/hush_test/hush-misc/redir5.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir5.tests (renamed from shell/hush_test/hush-misc/redir5.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir6.right (renamed from shell/hush_test/hush-misc/redir6.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir6.tests (renamed from shell/hush_test/hush-misc/redir6.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir7.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir7.tests | 12 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir8.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir8.tests | 15 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir9.right | 2 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir9.tests | 4 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redirA.right | 2 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redirA.tests | 11 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir_script.right (renamed from shell/hush_test/hush-misc/redir_script.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir_script.tests (renamed from shell/hush_test/hush-misc/redir_script.tests) | 0 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir_space.right (renamed from shell/hush_test/hush-parsing/redir_space.right) | 0 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir_space.tests (renamed from shell/hush_test/hush-parsing/redir_space.tests) | 0 |
24 files changed, 52 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/redir1.right b/shell/hush_test/hush-redir/redir1.right index 15515d1af..15515d1af 100644 --- a/shell/hush_test/hush-misc/redir1.right +++ b/shell/hush_test/hush-redir/redir1.right | |||
diff --git a/shell/hush_test/hush-misc/redir1.tests b/shell/hush_test/hush-redir/redir1.tests index ef2fbfb77..ef2fbfb77 100755 --- a/shell/hush_test/hush-misc/redir1.tests +++ b/shell/hush_test/hush-redir/redir1.tests | |||
diff --git a/shell/hush_test/hush-misc/redir2.right b/shell/hush_test/hush-redir/redir2.right index 7326d9603..7326d9603 100644 --- a/shell/hush_test/hush-misc/redir2.right +++ b/shell/hush_test/hush-redir/redir2.right | |||
diff --git a/shell/hush_test/hush-misc/redir2.tests b/shell/hush_test/hush-redir/redir2.tests index 81983cae2..81983cae2 100755 --- a/shell/hush_test/hush-misc/redir2.tests +++ b/shell/hush_test/hush-redir/redir2.tests | |||
diff --git a/shell/hush_test/hush-misc/redir3.right b/shell/hush_test/hush-redir/redir3.right index 3d20bbf68..3d20bbf68 100644 --- a/shell/hush_test/hush-misc/redir3.right +++ b/shell/hush_test/hush-redir/redir3.right | |||
diff --git a/shell/hush_test/hush-misc/redir3.tests b/shell/hush_test/hush-redir/redir3.tests index 7c28e4324..7c28e4324 100755 --- a/shell/hush_test/hush-misc/redir3.tests +++ b/shell/hush_test/hush-redir/redir3.tests | |||
diff --git a/shell/hush_test/hush-misc/redir4.right b/shell/hush_test/hush-redir/redir4.right index ead25f603..ead25f603 100644 --- a/shell/hush_test/hush-misc/redir4.right +++ b/shell/hush_test/hush-redir/redir4.right | |||
diff --git a/shell/hush_test/hush-misc/redir4.tests b/shell/hush_test/hush-redir/redir4.tests index c50b8cedf..c50b8cedf 100755 --- a/shell/hush_test/hush-misc/redir4.tests +++ b/shell/hush_test/hush-redir/redir4.tests | |||
diff --git a/shell/hush_test/hush-misc/redir5.right b/shell/hush_test/hush-redir/redir5.right index 52cce4feb..52cce4feb 100644 --- a/shell/hush_test/hush-misc/redir5.right +++ b/shell/hush_test/hush-redir/redir5.right | |||
diff --git a/shell/hush_test/hush-misc/redir5.tests b/shell/hush_test/hush-redir/redir5.tests index 957f9c81f..957f9c81f 100755 --- a/shell/hush_test/hush-misc/redir5.tests +++ b/shell/hush_test/hush-redir/redir5.tests | |||
diff --git a/shell/hush_test/hush-misc/redir6.right b/shell/hush_test/hush-redir/redir6.right index a97c4bdf1..a97c4bdf1 100644 --- a/shell/hush_test/hush-misc/redir6.right +++ b/shell/hush_test/hush-redir/redir6.right | |||
diff --git a/shell/hush_test/hush-misc/redir6.tests b/shell/hush_test/hush-redir/redir6.tests index c639ebb2d..c639ebb2d 100755 --- a/shell/hush_test/hush-misc/redir6.tests +++ b/shell/hush_test/hush-redir/redir6.tests | |||
diff --git a/shell/hush_test/hush-redir/redir7.right b/shell/hush_test/hush-redir/redir7.right new file mode 100644 index 000000000..6430b0211 --- /dev/null +++ b/shell/hush_test/hush-redir/redir7.right | |||
@@ -0,0 +1,3 @@ | |||
1 | Ok | ||
2 | Ok | ||
3 | Done | ||
diff --git a/shell/hush_test/hush-redir/redir7.tests b/shell/hush_test/hush-redir/redir7.tests new file mode 100755 index 000000000..e873a4622 --- /dev/null +++ b/shell/hush_test/hush-redir/redir7.tests | |||
@@ -0,0 +1,12 @@ | |||
1 | # Chars above 0x7f are used as special codes. | ||
2 | # 0x81 is CTLESC (see ash.c). | ||
3 | # The bug was that quoting and unquoting of them | ||
4 | # was out of sync for redirect filenames. | ||
5 | |||
6 | >unicode.sh | ||
7 | printf 'echo Ok >uni\x81code\n' >>unicode.sh | ||
8 | printf 'cat uni\x81code\n' >>unicode.sh | ||
9 | printf 'cat uni?code\n' >>unicode.sh | ||
10 | . ./unicode.sh | ||
11 | rm uni*code* | ||
12 | echo Done | ||
diff --git a/shell/hush_test/hush-redir/redir8.right b/shell/hush_test/hush-redir/redir8.right new file mode 100644 index 000000000..6430b0211 --- /dev/null +++ b/shell/hush_test/hush-redir/redir8.right | |||
@@ -0,0 +1,3 @@ | |||
1 | Ok | ||
2 | Ok | ||
3 | Done | ||
diff --git a/shell/hush_test/hush-redir/redir8.tests b/shell/hush_test/hush-redir/redir8.tests new file mode 100755 index 000000000..2bd386749 --- /dev/null +++ b/shell/hush_test/hush-redir/redir8.tests | |||
@@ -0,0 +1,15 @@ | |||
1 | # Chars above 0x7f are used as special codes. | ||
2 | # 0x81 is CTLESC (see ash.c). | ||
3 | # The bug was that quoting and unquoting of them | ||
4 | # was out of sync for redirect filenames. | ||
5 | |||
6 | # Subcase when redirect filename is specified in a variable. | ||
7 | |||
8 | >unicode.sh | ||
9 | printf 'v=uni\x81code\n' >>unicode.sh | ||
10 | printf 'echo Ok >"$v"\n' >>unicode.sh | ||
11 | printf 'cat uni\x81code\n' >>unicode.sh | ||
12 | printf 'cat uni?code\n' >>unicode.sh | ||
13 | . ./unicode.sh | ||
14 | rm uni*code* | ||
15 | echo Done | ||
diff --git a/shell/hush_test/hush-redir/redir9.right b/shell/hush_test/hush-redir/redir9.right new file mode 100644 index 000000000..34c2512e4 --- /dev/null +++ b/shell/hush_test/hush-redir/redir9.right | |||
@@ -0,0 +1,2 @@ | |||
1 | Ok | ||
2 | Done:0 | ||
diff --git a/shell/hush_test/hush-redir/redir9.tests b/shell/hush_test/hush-redir/redir9.tests new file mode 100755 index 000000000..8befa611c --- /dev/null +++ b/shell/hush_test/hush-redir/redir9.tests | |||
@@ -0,0 +1,4 @@ | |||
1 | echo Ok >file.tmp | ||
2 | cat 0<>file.tmp | ||
3 | echo Done:$? | ||
4 | rm file.tmp | ||
diff --git a/shell/hush_test/hush-redir/redirA.right b/shell/hush_test/hush-redir/redirA.right new file mode 100644 index 000000000..31406e336 --- /dev/null +++ b/shell/hush_test/hush-redir/redirA.right | |||
@@ -0,0 +1,2 @@ | |||
1 | tmp11 | ||
2 | tmp11 | ||
diff --git a/shell/hush_test/hush-redir/redirA.tests b/shell/hush_test/hush-redir/redirA.tests new file mode 100755 index 000000000..56833f938 --- /dev/null +++ b/shell/hush_test/hush-redir/redirA.tests | |||
@@ -0,0 +1,11 @@ | |||
1 | x="tmp11:tmp22" | ||
2 | |||
3 | # Bug was incorrectly expanding variables in >redir | ||
4 | echo "${x%:*}" >"${x%:*}" | ||
5 | echo tmp1* | ||
6 | rm tmp1* | ||
7 | |||
8 | # Also try unquoted | ||
9 | echo "${x%:*}" >${x%:*} | ||
10 | echo tmp1* | ||
11 | rm tmp1* | ||
diff --git a/shell/hush_test/hush-misc/redir_script.right b/shell/hush_test/hush-redir/redir_script.right index 6694ed334..6694ed334 100644 --- a/shell/hush_test/hush-misc/redir_script.right +++ b/shell/hush_test/hush-redir/redir_script.right | |||
diff --git a/shell/hush_test/hush-misc/redir_script.tests b/shell/hush_test/hush-redir/redir_script.tests index ccc497d7b..ccc497d7b 100755 --- a/shell/hush_test/hush-misc/redir_script.tests +++ b/shell/hush_test/hush-redir/redir_script.tests | |||
diff --git a/shell/hush_test/hush-parsing/redir_space.right b/shell/hush_test/hush-redir/redir_space.right index 084295204..084295204 100644 --- a/shell/hush_test/hush-parsing/redir_space.right +++ b/shell/hush_test/hush-redir/redir_space.right | |||
diff --git a/shell/hush_test/hush-parsing/redir_space.tests b/shell/hush_test/hush-redir/redir_space.tests index c0b543098..c0b543098 100755 --- a/shell/hush_test/hush-parsing/redir_space.tests +++ b/shell/hush_test/hush-redir/redir_space.tests | |||