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

Improve round-trip testing #842

Open
casey opened this issue May 27, 2021 · 0 comments
Open

Improve round-trip testing #842

casey opened this issue May 27, 2021 · 0 comments

Comments

@casey
Copy link
Owner

casey commented May 27, 2021

This is mostly motivated by the work on --fmt in #837.

A good way to exercise --fmt and --dump is to make sure that the output is produces, when re-parsed, is semantically equivalent to the original source justfile.

In every integration test, we should:

  • parse the justfile (expose Compiler::compile to tests)
  • Convert the compiled Justfile to the string that --dump and --fmt would produce
  • re-compile that string
  • Convert the original and dumped justfiles to Summarys
  • Compare the two summaries to ensure that they're identical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant