mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
sh: Add some already working tests that exercise new code paths.
This commit is contained in:
parent
7abf460488
commit
549bbb4fa1
4 changed files with 20 additions and 0 deletions
|
|
@ -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 a new issue