Author: jilles
Date: Fri Jun  3 21:17:42 2011
New Revision: 222661
URL: http://svn.freebsd.org/changeset/base/222661

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

Added:
  head/tools/regression/bin/sh/execution/set-n1.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/set-n2.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/set-n3.0   (contents, props changed)

Added: head/tools/regression/bin/sh/execution/set-n1.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-n1.0     Fri Jun  3 21:17:42 
2011        (r222661)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+v=$( ($SH -n <<'EOF'
+for
+EOF
+) 2>&1 >/dev/null)
+[ $? -ne 0 ] && [ -n "$v" ]

Added: head/tools/regression/bin/sh/execution/set-n2.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-n2.0     Fri Jun  3 21:17:42 
2011        (r222661)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+$SH -n <<'EOF'
+echo bad
+EOF

Added: head/tools/regression/bin/sh/execution/set-n3.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-n3.0     Fri Jun  3 21:17:42 
2011        (r222661)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+v=$( ($SH -nc 'for') 2>&1 >/dev/null)
+[ $? -ne 0 ] && [ -n "$v" ]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to