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

[DAPHNE-#773] Undetected invalid script args #800

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

ldirry
Copy link
Contributor

@ldirry ldirry commented Aug 4, 2024

When calling daphne, users can provide named script arguments that are available inside the DaphneDSL script.
According to the DaphneDSL language reference, only literals may be passed as script arguments

However, the following calls of daphne with invalid script arguments all passed "successfully" (status code 0) and some didn't even indicate any error.

  • Fixed invalid script arguments that try to evaulate an expression
  • bin/daphne test/api/cli/scriptargs/printSingleArg.daphne foo="sin(1.23)"
  • bin/daphne test/api/cli/scriptargs/printSingleArg.daphne foo="1.23*4.56"
  • Fixed invalid script arguments that were not literals
  • bin/daphne test/api/cli/scriptargs/printSingleArg.daphne foo=10xyz23
  • Added testcases for single script arguments
  • Added testcases where Daphne fails in case of an invalid script arguments

- Fixed invalid script arguments that try to evaulate an expression
- Fixed invalid script arguments that were not literals
- Added testcases for single script arguments
- Added testcases where Daphne fails in case of an invalid script arguments
@corepointer corepointer linked an issue Aug 9, 2024 that may be closed by this pull request
@corepointer corepointer added the bug A mistake in the code. label Aug 9, 2024
@corepointer corepointer added this to the v0.3 milestone Aug 9, 2024
@corepointer
Copy link
Collaborator

Thx for your work @ldirry

Code and tests LGTM

@corepointer corepointer merged commit dc61221 into daphne-eu:main Aug 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A mistake in the code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undetected invalid script args
2 participants