123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #!/bin/bash
-
- . "$TF_DIR/include/subtest.sh"
- . "$TF_DIR/include/tools.sh"
-
- flt_ours() {
- #
- # Filter list of modules on stdin; allow only ours
- #
- grep -xF \
- -e _pretty_plain \
- -e _pretty_journald \
- -e _pretty_html \
- -e sync \
- -e _pretty_color \
- -e inigrep \
- -e _pretty_notify \
- -e charmenu \
- -e exit \
- -e termcolors \
- -e pretty \
- -e sfdoc \
- -e sfpi \
- -e mdfmt \
- #FIXME: remove the filter when TFKit learns to test in sandbox
- }
-
- shellfu_get_all() {
- local t=$1 # type (functions, variables, modules)
- sfdoc --all --lsmod \
- | flt_ours \
- | case $t in
- modules) cat ;;
- variables) xargs -L1 sfdoc --all --lsvar ;;
- functions) xargs -L1 sfdoc --all --lsfun ;;
- esac \
- | LC_ALL=C sort
- }
-
- tf_enum_subtests() {
- echo "variables"
- echo "functions"
- echo "modules"
- }
-
- tf_do_subtest() {
- local name=$1
- tf_testflt -n "$name" -O "oracle/$name.stdout" shellfu_get_all "$name"
- }
-
- tf_do_subtests
|