Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sh: Add simple tests for set -x and PS4.

Obtained-from:  FreeBSD 222882
  • Loading branch information...
commit 406adc9f9bcd103313660f074c8ba4241261fff8 1 parent a590a30
Peter Avalos authored
View
8 tools/regression/bin/sh/execution/set-x1.0
@@ -0,0 +1,8 @@
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-x1.0,v 1.1 2011/06/08 21:58:19 jilles Exp $
+
+key='must_contain_this'
+{ r=`set -x; { : "$key"; } 2>&1 >/dev/null`; } 2>/dev/null
+case $r in
+*"$key"*) true ;;
+*) false ;;
+esac
View
9 tools/regression/bin/sh/execution/set-x2.0
@@ -0,0 +1,9 @@
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-x2.0,v 1.1 2011/06/08 21:58:19 jilles Exp $
+
+key='must contain this'
+PS4="$key+ "
+{ r=`set -x; { :; } 2>&1 >/dev/null`; } 2>/dev/null
+case $r in
+*"$key"*) true ;;
+*) false ;;
+esac
Please sign in to comment.
Something went wrong with that request. Please try again.