sh testsuite: sync ash-misc/source* and hush-misc/source*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
0ba99705a1
commit
c7a774dde4
4
shell/ash_test/ash-misc/source5.right
Normal file
4
shell/ash_test/ash-misc/source5.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/ash_test/ash-misc/source5.tests
Executable file
8
shell/ash_test/ash-misc/source5.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
|
@ -1,5 +1,2 @@
|
||||
hush: syntax error: unterminated ${name}
|
||||
line2
|
||||
Ok1:0
|
||||
hush: syntax error: unterminated '
|
||||
Ok2:1
|
||||
Sourced ok
|
||||
Done
|
||||
|
@ -1,10 +1,5 @@
|
||||
echo 'echo ${^}
|
||||
echo line2' >sourced1
|
||||
. ./sourced1
|
||||
echo Ok1:$?
|
||||
|
||||
echo "echo '" >sourced1
|
||||
. ./sourced1
|
||||
echo Ok2:$?
|
||||
|
||||
rm sourced1
|
||||
echo "echo Sourced ok" >../sourced.sh
|
||||
PATH="..:$PATH"
|
||||
. sourced.sh
|
||||
rm ../sourced.sh
|
||||
echo Done
|
||||
|
@ -1,4 +1 @@
|
||||
0:arg0 1:arg1 2:arg2
|
||||
Ok1:0
|
||||
0:arg0 1:q 2:w
|
||||
Ok2:0
|
||||
Done: 0
|
||||
|
@ -1,8 +1,3 @@
|
||||
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
|
||||
false
|
||||
. /dev/null
|
||||
echo Done: $?
|
||||
|
5
shell/hush_test/hush-misc/source4.right
Normal file
5
shell/hush_test/hush-misc/source4.right
Normal file
@ -0,0 +1,5 @@
|
||||
hush: syntax error: unterminated ${name}
|
||||
line2
|
||||
Ok1:0
|
||||
hush: syntax error: unterminated '
|
||||
Ok2:1
|
10
shell/hush_test/hush-misc/source4.tests
Executable file
10
shell/hush_test/hush-misc/source4.tests
Executable file
@ -0,0 +1,10 @@
|
||||
echo 'echo ${^}
|
||||
echo line2' >sourced1
|
||||
. ./sourced1
|
||||
echo Ok1:$?
|
||||
|
||||
echo "echo '" >sourced1
|
||||
. ./sourced1
|
||||
echo Ok2:$?
|
||||
|
||||
rm sourced1
|
4
shell/hush_test/hush-misc/source5.right
Normal file
4
shell/hush_test/hush-misc/source5.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/source5.tests
Executable file
8
shell/hush_test/hush-misc/source5.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
|
Loading…
Reference in New Issue
Block a user