sh: Add tests for -n flag. These already pass.
This commit is contained in:
parent
22e0612f0f
commit
3eee62c606
7
tools/regression/bin/sh/execution/set-n1.0
Normal file
7
tools/regression/bin/sh/execution/set-n1.0
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
v=$( ($SH -n <<'EOF'
|
||||
for
|
||||
EOF
|
||||
) 2>&1 >/dev/null)
|
||||
[ $? -ne 0 ] && [ -n "$v" ]
|
5
tools/regression/bin/sh/execution/set-n2.0
Normal file
5
tools/regression/bin/sh/execution/set-n2.0
Normal file
@ -0,0 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
$SH -n <<'EOF'
|
||||
echo bad
|
||||
EOF
|
4
tools/regression/bin/sh/execution/set-n3.0
Normal file
4
tools/regression/bin/sh/execution/set-n3.0
Normal file
@ -0,0 +1,4 @@
|
||||
# $FreeBSD$
|
||||
|
||||
v=$( ($SH -nc 'for') 2>&1 >/dev/null)
|
||||
[ $? -ne 0 ] && [ -n "$v" ]
|
Loading…
x
Reference in New Issue
Block a user