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>
This commit is contained in:
4
shell/hush_test/hush-misc/source2.right
Normal file
4
shell/hush_test/hush-misc/source2.right
Normal file
@@ -0,0 +1,4 @@
|
||||
0:arg0 1:arg1 2:arg2
|
||||
Ok1:0
|
||||
0:arg0 1:q 2:w
|
||||
Ok2:0
|
8
shell/hush_test/hush-misc/source2.tests
Executable file
8
shell/hush_test/hush-misc/source2.tests
Executable file
@@ -0,0 +1,8 @@
|
||||
echo 'echo "0:$0 1:$1 2:$2"' >sourced1
|
||||
set -- 1 2 3
|
||||
"$THIS_SH" -c '. ./sourced1' arg0 arg1 arg2
|
||||
echo Ok1:$?
|
||||
"$THIS_SH" -c '. ./sourced1 q w e' arg0 arg1 arg2
|
||||
echo Ok2:$?
|
||||
|
||||
rm sourced1
|
Reference in New Issue
Block a user