1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/bin/bash
-
- . "$TF_DIR/include/subtest.sh"
- . "$TF_DIR/include/tools.sh"
-
- tf_enum_subtests() {
- #
- # Enumerate tests to run
- #
- echo lsx_tricky
- echo lsv_tricky
- echo lsf_tricky
- echo direct_path
- echo included_path
- echo nonesuch
- echo empty
- echo naked
- echo simplest
- echo simple
- echo tricky
- echo simple_by_fun
- echo simple_by_var
- }
-
- export SHELLFU_PATH=test/include
-
- tf_do_subtest() {
- #
- # Decode parts of test case name and compose test command
- #
- local name=$1
- local cmd
- local o_es=0
- case $name in
- nonesuch) o_es=3 ;;
- esac
- case $name in
- lsx_tricky) cmd="sfdoc --ls test/include/tricky.sh" ;;
- lsv_tricky) cmd="sfdoc --lsvar test/include/tricky.sh" ;;
- lsf_tricky) cmd="sfdoc --lsfun test/include/tricky.sh" ;;
- direct_path) cmd="sfdoc -e markdown test/other/path.sh" ;;
- included_path) cmd="sfdoc -I test/other -e markdown path" ;;
- simple_by_fun) cmd="sfdoc -O -e markdown simple_foo" ;;
- simple_by_var) cmd="sfdoc -O -e markdown SIMPLE_LIMIT" ;;
- *) cmd="sfdoc -e markdown $name" ;;
- esac
- tf_testflt -n "$name" -O "oracle/$name.stdout" -E "oracle/$name.stderr" -S "$o_es" "$cmd"
- }
-
- tf_do_subtests
|