Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

Obtained-from:  FreeBSD 222882
  • Loading branch information...
commit 406adc9f9bcd103313660f074c8ba4241261fff8 1 parent a590a30
authored
8  tools/regression/bin/sh/execution/set-x1.0
... ...
@@ -0,0 +1,8 @@
  1
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-x1.0,v 1.1 2011/06/08 21:58:19 jilles Exp $
  2
+
  3
+key='must_contain_this'
  4
+{ r=`set -x; { : "$key"; } 2>&1 >/dev/null`; } 2>/dev/null
  5
+case $r in
  6
+*"$key"*) true ;;
  7
+*) false ;;
  8
+esac
9  tools/regression/bin/sh/execution/set-x2.0
... ...
@@ -0,0 +1,9 @@
  1
+# $FreeBSD: src/tools/regression/bin/sh/execution/set-x2.0,v 1.1 2011/06/08 21:58:19 jilles Exp $
  2
+
  3
+key='must contain this'
  4
+PS4="$key+ "
  5
+{ r=`set -x; { :; } 2>&1 >/dev/null`; } 2>/dev/null
  6
+case $r in
  7
+*"$key"*) true ;;
  8
+*) false ;;
  9
+esac

0 notes on commit 406adc9

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