sh: Add tests for -n flag. These already pass.

This commit is contained in:
Jilles Tjoelker 2011-06-03 21:17:42 +00:00
parent 22e0612f0f
commit 3eee62c606
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# $FreeBSD$
v=$( ($SH -n <<'EOF'
for
EOF
) 2>&1 >/dev/null)
[ $? -ne 0 ] && [ -n "$v" ]

View File

@ -0,0 +1,5 @@
# $FreeBSD$
$SH -n <<'EOF'
echo bad
EOF

View File

@ -0,0 +1,4 @@
# $FreeBSD$
v=$( ($SH -nc 'for') 2>&1 >/dev/null)
[ $? -ne 0 ] && [ -n "$v" ]