svn commit: r222882 - head/tools/regression/bin/sh/execution
Jilles Tjoelker
jilles at FreeBSD.org
Wed Jun 8 21:58:19 UTC 2011
Author: jilles
Date: Wed Jun 8 21:58:19 2011
New Revision: 222882
URL: http://svn.freebsd.org/changeset/base/222882
Log:
sh: Add simple tests for set -x and PS4.
Added:
head/tools/regression/bin/sh/execution/set-x1.0 (contents, props changed)
head/tools/regression/bin/sh/execution/set-x2.0 (contents, props changed)
Added: head/tools/regression/bin/sh/execution/set-x1.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-x1.0 Wed Jun 8 21:58:19 2011 (r222882)
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+key='must_contain_this'
+{ r=`set -x; { : "$key"; } 2>&1 >/dev/null`; } 2>/dev/null
+case $r in
+*"$key"*) true ;;
+*) false ;;
+esac
Added: head/tools/regression/bin/sh/execution/set-x2.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-x2.0 Wed Jun 8 21:58:19 2011 (r222882)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+key='must contain this'
+PS4="$key+ "
+{ r=`set -x; { :; } 2>&1 >/dev/null`; } 2>/dev/null
+case $r in
+*"$key"*) true ;;
+*) false ;;
+esac
More information about the svn-src-head
mailing list