sh: Add two tests for special cases in command substitution that already
work in stable/8.
This commit is contained in:
parent
64276929de
commit
fb3385d473
17
tools/regression/bin/sh/expansion/cmdsubst8.0
Normal file
17
tools/regression/bin/sh/expansion/cmdsubst8.0
Normal file
@ -0,0 +1,17 @@
|
||||
# $FreeBSD$
|
||||
# Not required by POSIX (although referenced in a non-normative section),
|
||||
# but possibly useful.
|
||||
|
||||
: hi there &
|
||||
p=$!
|
||||
q=$(jobs -l $p)
|
||||
|
||||
# Change tabs to spaces.
|
||||
set -f
|
||||
set -- $q
|
||||
r="$*"
|
||||
|
||||
case $r in
|
||||
*" $p "*) ;;
|
||||
*) echo Pid missing; exit 3 ;;
|
||||
esac
|
11
tools/regression/bin/sh/expansion/cmdsubst9.0
Normal file
11
tools/regression/bin/sh/expansion/cmdsubst9.0
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
set -e
|
||||
|
||||
cd /
|
||||
dummy=$(cd /bin)
|
||||
[ "$(pwd)" = / ]
|
||||
|
||||
v=1
|
||||
dummy=$(eval v=2)
|
||||
[ "$v" = 1 ]
|
Loading…
x
Reference in New Issue
Block a user