Skip to content

Commit

Permalink
Merge pull request #13 from rakus/test-with-yash-shell
Browse files Browse the repository at this point in the history
Also run tests with yash shell, if available
  • Loading branch information
rakus authored Oct 28, 2023
2 parents 9636172 + d7d4b40 commit 39468ff
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Build and deploy GH pages
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install cargo-get
uses: baptiste0928/cargo-install@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Install Shells (linux only)
if: ${{ matrix.os=='linux' }}
run: |
sudo apt-get install -y -qq ksh zsh
sudo apt-get install -y -qq ksh zsh yash
sudo apt-get install -y mksh || true
- name: Install Shells & Shellcheck (macos only)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Install Shells (linux only)
if: ${{ matrix.os=='linux' }}
run: |
sudo apt-get install -y -qq ksh zsh
sudo apt-get install -y -qq ksh zsh yash
sudo apt-get install -y mksh || true
- name: Install Shells & Shellcheck (macos only)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install Shells (linux only)
if: ${{ matrix.os=='linux' }}
run: |
sudo apt-get install -y -qq ksh zsh
sudo apt-get install -y -qq ksh zsh yash
sudo apt-get install -y mksh || true
- name: Install Shells & Shellcheck (macos only)
Expand Down
2 changes: 1 addition & 1 deletion script-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
;;
esac

test_shells="bash ksh zsh pdksh mksh dash sh"
test_shells="bash ksh zsh pdksh mksh yash dash sh"

run_tests()
{
Expand Down
9 changes: 6 additions & 3 deletions script-test/test-invalid-utf8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ script_name="$(basename "$0")"

start_test

if [ -z "$IS_MSYS" ] && [ -z "$IS_CYGWIN" ]; then

if [ -n "$IS_MSYS" ] || [ -n "$IS_CYGWIN" ]; then
echo "Skipped on Windows"
elif [ "$TEST_SHELL" = "yash" ]; then
echo "Skipped with shell Yash, as it can't handle invalid UTF-8"
else

# The following should create some valid code on day
test_pa_code 'exit 1' -o "n:name=name" -- "$(printf '\303\050')"
Expand All @@ -35,8 +40,6 @@ if [ -z "$IS_MSYS" ] && [ -z "$IS_CYGWIN" ]; then
test_pa_code 'exit 1' -s "X$(printf '\303\050')Y" -o "n:name=name" --
test_pa_code 'exit 1' -o "n:name=n$(printf '\303\050')ame" --

else
echo "Skipped on Windows"
fi

end_test

0 comments on commit 39468ff

Please sign in to comment.