Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

sh: Add tests for -n flag.

Obtained-from:  FreeBSD 222661
  • Loading branch information...
commit a590a306be516a94f7784a997f7fb729bd6fcccd 1 parent 9c3ade5
authored December 25, 2011
7  tools/regression/bin/sh/execution/set-n1.0
... ...
@@ -0,0 +1,7 @@
  1
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n1.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
  2
+
  3
+v=$( ($SH -n <<'EOF'
  4
+for
  5
+EOF
  6
+) 2>&1 >/dev/null)
  7
+[ $? -ne 0 ] && [ -n "$v" ]
5  tools/regression/bin/sh/execution/set-n2.0
... ...
@@ -0,0 +1,5 @@
  1
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n2.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
  2
+
  3
+$SH -n <<'EOF'
  4
+echo bad
  5
+EOF
4  tools/regression/bin/sh/execution/set-n3.0
... ...
@@ -0,0 +1,4 @@
  1
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-n3.0,v 1.1 2011/06/03 21:17:42 jilles Exp $
  2
+
  3
+v=$( ($SH -nc 'for') 2>&1 >/dev/null)
  4
+[ $? -ne 0 ] && [ -n "$v" ]

0 notes on commit a590a30

Please sign in to comment.
Something went wrong with that request. Please try again.