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:
jilles 2013-01-13 19:39:13 +00:00
parent b479a582c3
commit 84e42b7805
5 changed files with 25 additions and 0 deletions

@ -0,0 +1,6 @@
# $FreeBSD$
(eval "cd /
v=$(printf %0100000d 1)
echo \${#v}")
echo end

@ -0,0 +1,2 @@
100000
end

@ -0,0 +1,10 @@
# $FreeBSD$
f() {
x=2
}
(
x=1
f
[ "$x" = 2 ]
)

@ -0,0 +1,4 @@
# $FreeBSD$
(false; exit) && exit 3
exit 0

@ -0,0 +1,3 @@
# $FreeBSD$
(eval "set v=1"; false) && echo bad; :