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 more Scala CLI snippets for output (printed results) #536

Open
MateuszKubuszok opened this issue May 19, 2024 · 0 comments
Open

Test more Scala CLI snippets for output (printed results) #536

MateuszKubuszok opened this issue May 19, 2024 · 0 comments
Labels
enhancement low hanging fruit Task that should be easy to implement - perfect for people that want to start contributing.

Comments

@MateuszKubuszok
Copy link
Member

Currently most Scala CLI snippets in the docs are tested (with ScalaCLI.md Spec) either if they merely compile or for failures (// expected error:.

Snippets testing for successful result could println some result and have it checked with // expected output:.

This would be relatively simple to do:

  1. run sbt publish-local-for-tests to publish artifacts locally
  2. then scala-cli run scripts/test-snippets.scala -- --extra "chimney-version=[version from the artifacts]" --test-only '*' "$PWD/docs/docs" - it should run all tests
  3. then open some .md file, look fora a snippet without output/error test
  4. add
    // expected output:
    // make it fail
  5. rerun scala-cli run scripts/test-snippets.scala -- ... to verify that it fails
  6. modify example to make it pass
  7. go to 3. and repeat
@MateuszKubuszok MateuszKubuszok added enhancement low hanging fruit Task that should be easy to implement - perfect for people that want to start contributing. labels May 19, 2024
@MateuszKubuszok MateuszKubuszok changed the title Test more Scala CLI snippets for output Test more Scala CLI snippets for output (printed results) May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement low hanging fruit Task that should be easy to implement - perfect for people that want to start contributing.
Projects
None yet
Development

No branches or pull requests

1 participant