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

Test description does not parse when it contains a single open square bracket #39

Open
2 tasks
MeAmAnUsername opened this issue Jan 12, 2022 · 0 comments
Open
2 tasks

Comments

@MeAmAnUsername
Copy link

Summary
According to the documentation, a single open square bracket ([) is allowed in test descriptions as it is not a marker. However, it does not work: the file fails to parse.

Todo

  • Create syntax tests with a single open square bracket in the description
  • Fix bug (see 'implementation details' below)

Reproduction steps
Given: An example test case from PIE, but it should happen with any language:

test name ends with [ [[ data Foo[ = foreign java org.example.test.Foo {} ]] parse fails

Expected: The SPT file parses
Actual: The SPT file does not parse, error at the first [: Syntax error, not expected here: '['

Implementation details
This is caused by line 137 of the grammar: Description = (~[\n\r\[])+
It does not allow any open square brackets in the description, while it should allow one.
This could be resolved by making a special case for a single [:

Description = (~[\n\r\[]|\[~[\[])+

Note: I am not completely sure that this will work as is

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