sh: Add simple tests for set -x and PS4.
This commit is contained in:
parent
9fe1fe8204
commit
725cc7854e
8
tools/regression/bin/sh/execution/set-x1.0
Normal file
8
tools/regression/bin/sh/execution/set-x1.0
Normal file
@ -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
|
9
tools/regression/bin/sh/execution/set-x2.0
Normal file
9
tools/regression/bin/sh/execution/set-x2.0
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user