shell dot on steroids https://pagure.io/shellfu

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. . "$TF_DIR/include/subtest.sh"
  3. . "$TF_DIR/include/tools.sh"
  4. tf_enum_subtests() {
  5. #
  6. # Enumerate tests to run
  7. #
  8. echo lsx_tricky
  9. echo lsv_tricky
  10. echo lsf_tricky
  11. echo direct_path
  12. echo included_path
  13. echo nonesuch
  14. echo empty
  15. echo naked
  16. echo simplest
  17. echo simple
  18. echo tricky
  19. }
  20. export SHELLFU_PATH=test/include
  21. tf_do_subtest() {
  22. #
  23. # Decode parts of test case name and compose test command
  24. #
  25. local name=$1
  26. local cmd
  27. case $name in
  28. lsx_tricky) cmd="sfdoc --ls test/include/tricky.sh" ;;
  29. lsv_tricky) cmd="sfdoc --lsvar test/include/tricky.sh" ;;
  30. lsf_tricky) cmd="sfdoc --lsfun test/include/tricky.sh" ;;
  31. direct_path) cmd="sfdoc -e markdown test/other/path.sh" ;;
  32. included_path) cmd="sfdoc -I test/other -e markdown path" ;;
  33. *) cmd="sfdoc -e markdown $name" ;;
  34. esac
  35. tf_testflt -n "$name" -O "oracle/$name.stdout" -E "oracle/$name.stderr" "$cmd"
  36. }
  37. tf_do_subtests