diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-03-17 14:11:04 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-03-17 14:11:04 +0100 |
commit | 88b532d59af81f3b788864b2d6d42e1f86bc8de0 (patch) | |
tree | 0dadcf6799131c15de084c828265ac17ac051b52 /shell/hush_test | |
parent | 4ef1439c593daadeffb3f00eaaf49e190a3039e1 (diff) | |
download | busybox-w32-88b532d59af81f3b788864b2d6d42e1f86bc8de0.tar.gz busybox-w32-88b532d59af81f3b788864b2d6d42e1f86bc8de0.tar.bz2 busybox-w32-88b532d59af81f3b788864b2d6d42e1f86bc8de0.zip |
hush: source builtin should override $N only if it has args
function old new delta
builtin_source 174 184 +10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-misc/source2.right | 4 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/source2.tests | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/source2.right b/shell/hush_test/hush-misc/source2.right new file mode 100644 index 000000000..0587bad67 --- /dev/null +++ b/shell/hush_test/hush-misc/source2.right | |||
@@ -0,0 +1,4 @@ | |||
1 | 0:arg0 1:arg1 2:arg2 | ||
2 | Ok1:0 | ||
3 | 0:arg0 1:q 2:w | ||
4 | Ok2:0 | ||
diff --git a/shell/hush_test/hush-misc/source2.tests b/shell/hush_test/hush-misc/source2.tests new file mode 100755 index 000000000..40b6b83cd --- /dev/null +++ b/shell/hush_test/hush-misc/source2.tests | |||
@@ -0,0 +1,8 @@ | |||
1 | echo 'echo "0:$0 1:$1 2:$2"' >sourced1 | ||
2 | set -- 1 2 3 | ||
3 | "$THIS_SH" -c '. ./sourced1' arg0 arg1 arg2 | ||
4 | echo Ok1:$? | ||
5 | "$THIS_SH" -c '. ./sourced1 q w e' arg0 arg1 arg2 | ||
6 | echo Ok2:$? | ||
7 | |||
8 | rm sourced1 | ||