sh: Add some testcases related to subshells.
These failed in earlier attempts to execute more subshells without forking. The patches are uncommitted.
This commit is contained in:
parent
b479a582c3
commit
84e42b7805
tools/regression/bin/sh/execution
6
tools/regression/bin/sh/execution/subshell1.0
Normal file
6
tools/regression/bin/sh/execution/subshell1.0
Normal file
@ -0,0 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
(eval "cd /
|
||||
v=$(printf %0100000d 1)
|
||||
echo \${#v}")
|
||||
echo end
|
2
tools/regression/bin/sh/execution/subshell1.0.stdout
Normal file
2
tools/regression/bin/sh/execution/subshell1.0.stdout
Normal file
@ -0,0 +1,2 @@
|
||||
100000
|
||||
end
|
10
tools/regression/bin/sh/execution/subshell2.0
Normal file
10
tools/regression/bin/sh/execution/subshell2.0
Normal file
@ -0,0 +1,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
f() {
|
||||
x=2
|
||||
}
|
||||
(
|
||||
x=1
|
||||
f
|
||||
[ "$x" = 2 ]
|
||||
)
|
4
tools/regression/bin/sh/execution/subshell3.0
Normal file
4
tools/regression/bin/sh/execution/subshell3.0
Normal file
@ -0,0 +1,4 @@
|
||||
# $FreeBSD$
|
||||
|
||||
(false; exit) && exit 3
|
||||
exit 0
|
3
tools/regression/bin/sh/execution/subshell4.0
Normal file
3
tools/regression/bin/sh/execution/subshell4.0
Normal file
@ -0,0 +1,3 @@
|
||||
# $FreeBSD$
|
||||
|
||||
(eval "set v=1"; false) && echo bad; :
|
Loading…
x
Reference in New Issue
Block a user