Skip to content
Browse files

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

Obtained-from:  FreeBSD 222882
  • Loading branch information...
1 parent a590a30 commit 406adc9f9bcd103313660f074c8ba4241261fff8 Peter Avalos committed
Showing with 17 additions and 0 deletions.
  1. +8 −0 tools/regression/bin/sh/execution/set-x1.0
  2. +9 −0 tools/regression/bin/sh/execution/set-x2.0
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

0 comments on commit 406adc9

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