mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 09:13:37 +01:00
sh: Add some already working tests that exercise new code paths.
This commit is contained in:
parent
7abf460488
commit
549bbb4fa1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314637
@ -39,6 +39,9 @@ ${PACKAGE}FILES+= cmdsubst14.0
|
||||
${PACKAGE}FILES+= cmdsubst15.0
|
||||
${PACKAGE}FILES+= cmdsubst16.0
|
||||
${PACKAGE}FILES+= cmdsubst17.0
|
||||
${PACKAGE}FILES+= cmdsubst18.0
|
||||
${PACKAGE}FILES+= cmdsubst19.0
|
||||
${PACKAGE}FILES+= cmdsubst20.0
|
||||
${PACKAGE}FILES+= export1.0
|
||||
${PACKAGE}FILES+= export2.0
|
||||
${PACKAGE}FILES+= export3.0
|
||||
|
6
bin/sh/tests/expansion/cmdsubst18.0
Normal file
6
bin/sh/tests/expansion/cmdsubst18.0
Normal file
@ -0,0 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
x=X
|
||||
unset n
|
||||
r=${x+$(echo a)}${x-$(echo b)}${n+$(echo c)}${n-$(echo d)}$(echo e)
|
||||
[ "$r" = aXde ]
|
5
bin/sh/tests/expansion/cmdsubst19.0
Normal file
5
bin/sh/tests/expansion/cmdsubst19.0
Normal file
@ -0,0 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
b=200 c=30 d=5 x=4
|
||||
r=$(echo a)$(($(echo b) + ${x+$(echo c)} + ${x-$(echo d)}))$(echo e)
|
||||
[ "$r" = a234e ]
|
6
bin/sh/tests/expansion/cmdsubst20.0
Normal file
6
bin/sh/tests/expansion/cmdsubst20.0
Normal file
@ -0,0 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
set -T
|
||||
trapped=''
|
||||
trap "trapped=x$trapped" USR1
|
||||
[ "x$(kill -USR1 $$)y" = xy ] && [ "$trapped" = x ]
|
Loading…
Reference in New Issue
Block a user