Skip to content

Commit

Permalink
Mention yash in script-test/README.md
Browse files Browse the repository at this point in the history
Also minor changes in run.sh
  • Loading branch information
rakus committed Oct 29, 2023
1 parent 751621a commit ece9b01
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ target/
.idea/
*.add.spl
*.profraw
*.log
1 change: 1 addition & 0 deletions script-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ If installed the following shells are used for testing:
* zsh
* mksh
* pdksh
* yash
* dash
* sh

17 changes: 10 additions & 7 deletions script-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
script_name="$(basename "$0")"
script_dir="$(cd "$(dirname "$0")" && pwd)" || exit 1


cd "$script_dir" || exit 1

echo "Test Environment: $(uname -a)"
Expand All @@ -16,11 +15,7 @@ case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
IS_CYGWIN=TRUE
export IS_CYGWIN
;;
*msys*)
IS_MSYS=TRUE
export IS_MSYS
;;
*mingw*)
*msys* | *mingw*)
IS_MSYS=TRUE
export IS_MSYS
;;
Expand Down Expand Up @@ -49,6 +44,10 @@ get_shell_version()
esac
}

#
# Run tests with shell
# $1: The shell to execute
# $2...: The shell dialect to test
test_with_shell()
{
unset TEST_SHELL
Expand Down Expand Up @@ -76,7 +75,10 @@ test_with_shell()
}


get_supported_shell_dialects()
#
# Determine the native dialect of the shell. Might be none.
# $1: The shell
get_supported_shell_dialect()
{
bn_sh=$(basename "$1")

Expand Down Expand Up @@ -131,6 +133,7 @@ for sh in $test_shells; do
# shellcheck disable=SC2086 # native_dialect _should_ split
test_with_shell "$sh" $native_dialect sh
else
# only test 'sh' mode
test_with_shell "$sh" sh
fi
[ -n "$quick" ] && break
Expand Down

0 comments on commit ece9b01

Please sign in to comment.