From: Peter Avalos Date: Sun, 25 Dec 2011 17:54:50 +0000 (-0800) Subject: sh: Add simple tests for set -x and PS4. X-Git-Tag: v3.0.0~283 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/406adc9f9bcd103313660f074c8ba4241261fff8 sh: Add simple tests for set -x and PS4. Obtained-from: FreeBSD 222882 --- diff --git a/tools/regression/bin/sh/execution/set-x1.0 b/tools/regression/bin/sh/execution/set-x1.0 new file mode 100644 index 0000000000..87a59473b6 --- /dev/null +++ b/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 diff --git a/tools/regression/bin/sh/execution/set-x2.0 b/tools/regression/bin/sh/execution/set-x2.0 new file mode 100644 index 0000000000..e8818cabdc --- /dev/null +++ b/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