diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-18 11:46:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-18 11:46:35 +0200 |
commit | f37eb3999bce2ea46fef0214e33279b81609e596 (patch) | |
tree | bef567d0a9fe53cd1397b9b8e1a97c994cdb6d5d /shell/hush_test/hush-misc | |
parent | 7673e7fda42a2665f8528d531e9596f264643149 (diff) | |
download | busybox-w32-f37eb3999bce2ea46fef0214e33279b81609e596.tar.gz busybox-w32-f37eb3999bce2ea46fef0214e33279b81609e596.tar.bz2 busybox-w32-f37eb3999bce2ea46fef0214e33279b81609e596.zip |
hush: fix handling of empty arguments
function old new delta
builtin_exec 25 83 +58
parse_stream 2242 2261 +19
run_pipe 1782 1787 +5
static.pseudo_null_str - 3 +3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes
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/empty_args.right | 6 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/empty_args.tests | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/empty_args.right b/shell/hush_test/hush-misc/empty_args.right new file mode 100644 index 000000000..38ed8b8be --- /dev/null +++ b/shell/hush_test/hush-misc/empty_args.right | |||
@@ -0,0 +1,6 @@ | |||
1 | Null 0th arg: | ||
2 | hush: can't execute '': No such file or directory | ||
3 | 127 | ||
4 | Null 1st arg: | ||
5 | 0 | ||
6 | Null arg in exec: | ||
diff --git a/shell/hush_test/hush-misc/empty_args.tests b/shell/hush_test/hush-misc/empty_args.tests new file mode 100755 index 000000000..efce5494a --- /dev/null +++ b/shell/hush_test/hush-misc/empty_args.tests | |||
@@ -0,0 +1,9 @@ | |||
1 | echo Null 0th arg: | ||
2 | "" | ||
3 | echo $? | ||
4 | echo Null 1st arg: | ||
5 | # printf without args would print usage info | ||
6 | printf "" | ||
7 | echo $? | ||
8 | echo Null arg in exec: | ||
9 | exec printf "" | ||