Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toybox sh does not support leading left parenthesis in case syntax #355

Open
ScoreUnder opened this issue Jun 7, 2022 · 0 comments
Open

Comments

@ScoreUnder
Copy link

test.sh:

case x in
  (x) echo Yep;;
esac

invocation: toybox sh test.sh

version: 0.8.7

expected: "Yep" on stdout; exit code 0

actual: sh: syntax error 'test.sh'@2: (


POSIX-compatible shells must support the optional leading left-parenthesis for each individual pattern: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_05. In practice this seems to hold true too; the posixy shells I've tried (mksh ksh zsh dash bash posh busybox) all conform to the expected behaviour.

I first encountered this testing against the dash-rc script here, which is also where I encountered #354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant