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

Create test case to prevent nested selectors #279

Closed
Pike opened this issue Aug 3, 2019 · 0 comments
Closed

Create test case to prevent nested selectors #279

Pike opened this issue Aug 3, 2019 · 0 comments

Comments

@Pike
Copy link
Contributor

Pike commented Aug 3, 2019

We should audit the test coverage for

return ([selector, variants]) => {
let selector_is_valid =
selector instanceof FTL.StringLiteral
|| selector instanceof FTL.NumberLiteral
|| selector instanceof FTL.VariableReference
|| selector instanceof FTL.FunctionReference
|| (selector instanceof FTL.TermReference
&& selector.attribute);

Notably, I don't think we have a test to check for select expressions as selectors.

AFAICT, this also bleeds into our implementations.

Pike added a commit to Pike/fluent that referenced this issue Aug 5, 2019
…tfluent#279

There were no tests for the full set of forbidden selector expressions.

That made it possible to pass the existing test suite while adding
`FTL.Placeable` to the list of allowed grammar productions in
`abstract.js`.
The test coverage is split between `select_expressions.ftl`, and
`reference_expressions.ftl`.
@Pike Pike closed this as completed in 70e305a Aug 5, 2019
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