| /src/bin/sh/tests/expansion/ |
| H A D | trim1.0 | 7 testcase() { 23 testcase 'set -- ${t%t}' '1|texttex' 24 testcase 'set -- "${t%t}"' '1|texttex' 25 testcase 'set -- ${t%e*}' '1|textt' 26 testcase 'set -- "${t%e*}"' '1|textt' 27 testcase 'set -- ${t%%e*}' '1|t' 28 testcase 'set -- "${t%%e*}"' '1|t' 29 testcase 'set -- ${t%%*}' '0|' 30 testcase 'set -- "${t%%*}"' '1|' 31 testcase 'set -- ${t#t}' '1|exttext' [all …]
|
| H A D | plus-minus1.0 | 7 testcase() { 23 testcase 'set -- a b' '2|a|b' 24 testcase 'set --' '0|' 25 testcase 'set -- ${e}' '0|' 26 testcase 'set -- "${e}"' '1|' 28 testcase 'set -- $p' '1|/etc/' 29 testcase 'set -- "$p"' '1|/et[c]/' 30 testcase 'set -- ${s+$p}' '1|/etc/' 31 testcase 'set -- "${s+$p}"' '1|/et[c]/' 32 testcase 'set -- ${s+"$p"}' '1|/et[c]/' [all …]
|
| H A D | trim8.0 | 16 testcase() { 32 testcase 'set -- "$s"' "1|$s" 33 testcase 'set -- "${s#$c2}"' "1|$s" 34 testcase 'set -- "${s#*}"' "1|$s" 35 testcase 'set -- "${s#$c1}"' "1|$c2$c3$c4" 36 testcase 'set -- "${s#$c1$c2}"' "1|$c3$c4" 37 testcase 'set -- "${s#$c1$c2$c3}"' "1|$c4" 38 testcase 'set -- "${s#$c1$c2$c3$c4}"' "1|" 39 testcase 'set -- "${s#?}"' "1|$c2$c3$c4" 40 testcase 'set -- "${s#??}"' "1|$c3$c4" [all …]
|
| H A D | cmdsubst6.0 | 6 testcase() { 22 testcase '$w' 23 testcase '1${w+1}' 24 testcase '1${w-1}' 25 testcase '1${v+1}' 26 testcase '1${v-1}' 27 testcase '1${w:+1}' 28 testcase '1${w:-1}' 29 testcase '1${v:+1}' 30 testcase '1${v:-1}' [all …]
|
| H A D | tilde2.0 | 9 testcase() { 25 testcase 'set -- ${$+~}' '1|/tmp' 26 testcase 'set -- ${$+~/}' '1|/tmp/' 27 testcase 'set -- ${$+~/foo}' '1|/tmp/foo' 28 testcase 'set -- ${$+x~}' '1|x~' 29 testcase 'set -- ${$+~root}' "1|$roothome" 30 testcase 'set -- ${$+"~"}' '1|~' 31 testcase 'set -- ${$+"~/"}' '1|~/' 32 testcase 'set -- ${$+"~/foo"}' '1|~/foo' 33 testcase 'set -- ${$+"x~"}' '1|x~' [all …]
|
| H A D | trim9.0 | 8 testcase() { 24 testcase 'shift $#; set -- "${*#Q}"' '1|' 25 testcase 'shift $#; set -- "${*##Q}"' '1|' 26 testcase 'shift $#; set -- "${*%Q}"' '1|' 27 testcase 'shift $#; set -- "${*%%Q}"' '1|' 28 testcase 'set -- Q R; set -- "${*#Q}"' '1| R' 29 testcase 'set -- Q R; set -- "${*##Q}"' '1| R' 30 testcase 'set -- Q R; set -- "${*%R}"' '1|Q ' 31 testcase 'set -- Q R; set -- "${*%%R}"' '1|Q ' 32 testcase 'set -- Q R; set -- "${*#S}"' '1|Q R' [all …]
|
| H A D | trim2.0 | 7 testcase() { 24 testcase 'set -- $s' '1|ast*que?non' 25 testcase 'set -- ${s%\?*}' '1|ast*que' 26 testcase 'set -- "${s%\?*}"' '1|ast*que' 27 testcase 'set -- ${s%\**}' '1|ast' 28 testcase 'set -- "${s%\**}"' '1|ast' 29 testcase 'set -- ${s%"$q"*}' '1|ast*que' 30 testcase 'set -- "${s%"$q"*}"' '1|ast*que' 31 testcase 'set -- ${s%"$a"*}' '1|ast' 32 testcase 'set -- "${s%"$a"*}"' '1|ast' [all …]
|
| H A D | trim3.0 | 7 testcase() { 24 testcase 'set -- "${w%${w#???}}"' '1|a b' 26 testcase 'set -- ${p#/et[}' '1|c]/' 27 testcase 'set -- "${p#/et[}"' '1|c]/' 28 testcase 'set -- "${p%${p#????}}"' '1|/et[' 30 testcase 'set -- ${b%'\'}\''}' '1|{{(#)}' 32 testcase 'set -- ${c#\\}' '1|\\\' 33 testcase 'set -- ${c#\\\\}' '1|\\' 34 testcase 'set -- ${c#\\\\\\}' '1|\' 35 testcase 'set -- ${c#\\\\\\\\}' '0|' [all …]
|
| H A D | tilde1.0 | 9 testcase() { 25 testcase 'set -- ~' '1|/tmp' 26 testcase 'set -- ~/foo' '1|/tmp/foo' 27 testcase 'set -- x~' '1|x~' 28 testcase 'set -- ~root' "1|$roothome" 30 testcase 'set -- "$h"' '1|/tmp' 33 testcase 'set -- ~' '1|/tmp' 34 testcase 'set -- ~/foo' '1|/tmp/foo' 35 testcase 'set -- $h' '2|/t|p' 38 testcase 'set -- $t' '1|~' [all …]
|
| H A D | cmdsubst7.0 | 5 testcase() { 19 testcase ': ${v=0}' 20 testcase ': ${v:=0}' 21 testcase ': $((v=1))' 22 testcase ': $((v+=1))' 24 testcase ': $(($w))' 25 testcase ': $((${$+v=1}))' 26 testcase ': $((v${$+=1}))' 27 testcase ': $((v $(echo =) 1))' 28 testcase ': $(($(echo $w)))'
|
| H A D | assign1.0 | 7 testcase() { 23 testcase 'v=; set -- ${v=a b} $v' '0|' 24 testcase 'unset v; set -- ${v=a b} $v' '4|a|b|a|b' 25 testcase 'v=; set -- ${v:=a b} $v' '4|a|b|a|b' 26 testcase 'v=; set -- "${v:=a b}" "$v"' '2|a b|a b' 28 testcase 'v=; set -- ${v:=a\ b} $v' '4|a|b|a|b' 29 testcase 'v=; set -- ${v:=$p} $v' '2|/etc/|/etc/' 30 testcase 'v=; set -- "${v:=$p}" "$v"' '2|/et[c]/|/et[c]/' 31 testcase 'v=; set -- "${v:=a\ b}" "$v"' '2|a\ b|a\ b' 32 testcase 'v=; set -- ${v:="$p"} $v' '2|/etc/|/etc/' [all …]
|
| H A D | plus-minus3.0 | 7 testcase() { 32 testcase 'set -- "${p+"/et[c]/"}"' '1|/etc/' 33 testcase 'set -- "${p-"/et[c]/"}"' '1|/et[c]/' 34 testcase 'set -- "${p+"$p"}"' '1|/etc/' 35 testcase 'set -- "${p-"$p"}"' '1|/et[c]/' 36 testcase 'set -- "${p+"""/et[c]/"}"' '1|/etc/' 37 testcase 'set -- "${p-"""/et[c]/"}"' '1|/et[c]/' 38 testcase 'set -- "${p+"""$p"}"' '1|/etc/' 39 testcase 'set -- "${p-"""$p"}"' '1|/et[c]/' 40 testcase 'set -- "${p+"\@"}"' '1|@' [all …]
|
| /src/bin/sh/tests/parameters/ |
| H A D | positional2.0 | 5 testcase() { 21 testcase 'set -- a b; set -- p$@q' '2|pa|bq' 22 testcase 'set -- a b; set -- $@q' '2|a|bq' 23 testcase 'set -- a b; set -- p$@' '2|pa|b' 24 testcase 'set -- a b; set -- p$@q' '2|pa|bq' 25 testcase 'set -- a b; set -- $@q' '2|a|bq' 26 testcase 'set -- a b; set -- p$@' '2|pa|b' 27 testcase 'set -- a b; set -- p$*q' '2|pa|bq' 28 testcase 'set -- a b; set -- $*q' '2|a|bq' 29 testcase 'set -- a b; set -- p$*' '2|pa|b' [all …]
|
| H A D | positional8.0 | 5 testcase() { 21 testcase 'shift $#; set -- ""$*' '1|' 22 testcase 'shift $#; set -- $*""' '1|' 23 testcase 'shift $#; set -- ""$@' '1|' 24 testcase 'shift $#; set -- $@""' '1|' 25 testcase 'shift $#; set -- """$*"' '1|' 26 testcase 'shift $#; set -- "$*"""' '1|' 27 testcase 'shift $#; set -- """$@"' '1|' 28 testcase 'shift $#; set -- "$@"""' '1|'
|
| /src/contrib/ntp/sntp/libevent/test/ |
| H A D | tinytest.c | 107 testcase_run_in_thread_(const struct testcase_t *testcase, void *env) in testcase_run_in_thread_() argument 115 &(testcase->fn), in testcase_run_in_thread_() 154 testcase_run_bare_(const struct testcase_t *testcase) in testcase_run_bare_() argument 158 if (testcase->setup) { in testcase_run_bare_() 159 env = testcase->setup->setup_fn(testcase); in testcase_run_bare_() 170 cur_test_outcome = testcase_run_in_thread_(testcase, env); in testcase_run_bare_() 173 testcase->fn(env); in testcase_run_bare_() 177 testcase->fn(env); in testcase_run_bare_() 182 if (testcase->setup) { in testcase_run_bare_() 183 if (testcase->setup->cleanup_fn(testcase, env) == 0) in testcase_run_bare_() [all …]
|
| H A D | regress_main.c | 239 basic_test_setup(const struct testcase_t *testcase) in basic_test_setup() argument 248 if (testcase->flags & TT_ENABLE_IOCP_FLAG) in basic_test_setup() 252 if (testcase->flags & TT_ENABLE_DEBUG_MODE && in basic_test_setup() 258 if (testcase->flags & TT_NEED_THREADS) { in basic_test_setup() 259 if (!(testcase->flags & TT_FORK)) in basic_test_setup() 272 if (testcase->flags & TT_NEED_SOCKETPAIR) { in basic_test_setup() 288 if (testcase->flags & TT_NEED_BASE) { in basic_test_setup() 289 if (testcase->flags & TT_LEGACY) in basic_test_setup() 296 if (testcase->flags & TT_ENABLE_IOCP_FLAG) { in basic_test_setup() 303 if (testcase->flags & TT_NEED_DNS) { in basic_test_setup() [all …]
|
| /src/contrib/libevent/test/ |
| H A D | tinytest.c | 107 testcase_run_in_thread_(const struct testcase_t *testcase, void *env) in testcase_run_in_thread_() argument 115 &(testcase->fn), in testcase_run_in_thread_() 154 testcase_run_bare_(const struct testcase_t *testcase) in testcase_run_bare_() argument 158 if (testcase->setup) { in testcase_run_bare_() 159 env = testcase->setup->setup_fn(testcase); in testcase_run_bare_() 170 cur_test_outcome = testcase_run_in_thread_(testcase, env); in testcase_run_bare_() 173 testcase->fn(env); in testcase_run_bare_() 177 testcase->fn(env); in testcase_run_bare_() 182 if (testcase->setup) { in testcase_run_bare_() 183 if (testcase->setup->cleanup_fn(testcase, env) == 0) in testcase_run_bare_() [all …]
|
| H A D | regress_main.c | 239 basic_test_setup(const struct testcase_t *testcase) in basic_test_setup() argument 248 if (testcase->flags & TT_ENABLE_IOCP_FLAG) in basic_test_setup() 252 if (testcase->flags & TT_ENABLE_DEBUG_MODE && in basic_test_setup() 258 if (testcase->flags & TT_NEED_THREADS) { in basic_test_setup() 259 if (!(testcase->flags & TT_FORK)) in basic_test_setup() 272 if (testcase->flags & TT_NEED_SOCKETPAIR) { in basic_test_setup() 288 if (testcase->flags & TT_NEED_BASE) { in basic_test_setup() 289 if (testcase->flags & TT_LEGACY) in basic_test_setup() 296 if (testcase->flags & TT_ENABLE_IOCP_FLAG) { in basic_test_setup() 303 if (testcase->flags & TT_NEED_DNS) { in basic_test_setup() [all …]
|
| /src/contrib/dialog/ |
| H A D | demo.pl | 134 my $testcase = $dialog_result[0]; 135 if ( $testcase eq $RHS_CLEAR ) { 139 elsif ( $testcase eq $RHS_TEXTBOX ) { 142 elsif ( $testcase eq $RHS_MSGBOX ) { 150 elsif ( $testcase eq $RHS_INFOBOX ) { 168 elsif ( $testcase eq $RHS_YESNO ) { 194 elsif ( $testcase eq $RHS_GAUGE ) { 219 elsif ( $testcase eq $RHS_INPUTBOX ) { 230 elsif ( $testcase eq $RHS_MENU ) { 245 elsif ( $testcase eq $RHS_MENUL ) { [all …]
|
| /src/lib/libarchive/tests/ |
| H A D | functional_test.sh | 33 local testcase=${1}; shift 35 atf_check -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" 44 for testcase in ${testcases}; do 45 atf_test_case ${testcase} 46 eval "${testcase}_body() { check ${testcase}; }" 47 atf_add_test_case ${testcase}
|
| /src/tests/sys/netpfil/common/ |
| H A D | runner.subr | 38 if [ -z "${testcase}" ]; then 39 echo "no testcase passed to setup_test" 42 atf_test_case "${fw}_${testcase}" "cleanup" 43 eval "${fw}_${testcase}_head(){ ${testcase}_head; }" 44 eval "${fw}_${testcase}_body(){ ${testcase}_body $fw; }" 45 eval "${fw}_${testcase}_cleanup(){ ${testcase}_cleanup $fw; }" 46 tests="$tests ${fw}_${testcase}" 48 testcase=$1 61 for testcase in $args; 63 atf_add_test_case "$testcase"
|
| /src/usr.bin/tar/tests/ |
| H A D | functional_test.sh | 34 local testcase=${1}; shift 36 atf_check -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" 45 for testcase in ${testcases}; do 46 atf_test_case ${testcase} 47 eval "${testcase}_body() { check ${testcase}; }" 48 atf_add_test_case ${testcase}
|
| /src/usr.bin/unzip/tests/ |
| H A D | functional_test.sh | 34 local testcase=${1}; shift 41 atf_check -e ignore -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" 50 for testcase in ${testcases}; do 51 atf_test_case ${testcase} 52 eval "${testcase}_body() { check ${testcase}; }" 53 atf_add_test_case ${testcase}
|
| /src/usr.bin/bsdcat/tests/ |
| H A D | functional_test.sh | 34 local testcase=${1}; shift 41 atf_check -e ignore -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" 50 for testcase in ${testcases}; do 51 atf_test_case ${testcase} 52 eval "${testcase}_body() { check ${testcase}; }" 53 atf_add_test_case ${testcase}
|
| /src/usr.bin/cpio/tests/ |
| H A D | functional_test.sh | 34 local testcase=${1}; shift 41 atf_check -e ignore -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" 50 for testcase in ${testcases}; do 51 atf_test_case ${testcase} 52 eval "${testcase}_body() { check ${testcase}; }" 53 atf_add_test_case ${testcase}
|