Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sh: Add tests for -n flag.

Obtained-from:  FreeBSD 222661
  • Loading branch information...
commit a590a306be516a94f7784a997f7fb729bd6fcccd 1 parent 9c3ade5
Peter Avalos authored
View
7 tools/regression/bin/sh/execution/set-n1.0
@@ -0,0 +1,7 @@
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n1.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
+
+v=$( ($SH -n <<'EOF'
+for
+EOF
+) 2>&1 >/dev/null)
+[ $? -ne 0 ] && [ -n "$v" ]
View
5 tools/regression/bin/sh/execution/set-n2.0
@@ -0,0 +1,5 @@
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n2.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
+
+$SH -n <<'EOF'
+echo bad
+EOF
View
4 tools/regression/bin/sh/execution/set-n3.0
@@ -0,0 +1,4 @@
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n3.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
+
+v=$( ($SH -nc 'for') 2>&1 >/dev/null)
+[ $? -ne 0 ] && [ -n "$v" ]
Please sign in to comment.
Something went wrong with that request. Please try again.