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

Support for REPL-simulated test cases #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreypopp
Copy link

The implementation is based on the code from Documenter.jl.

Allows to define test cases with REPL-simulated syntax:

julia> 1
1

This is useful as allows to define new test cases by simply copy pasting real REPL sessions.

If you think this is useful I can improve the test suite (now the test execution isn't tested and it should be as code path is altered to use same output display as in REPL). Otherwise I'm fine with vendoring NarrativeTest.jl in my code directly if you think the package should stay as-is.

@andreypopp andreypopp force-pushed the master branch 2 times, most recently from c1b589b to 83acf8f Compare April 27, 2022 10:18
@xitology
Copy link
Member

xitology commented May 2, 2022

Thanks for the PR! This seems useful to me. Different show() depending on test.repl bothers me a little, but I can't think of a way to avoid it.

@andreypopp andreypopp changed the title RFC: Support for REPL-simulated test cases Support for REPL-simulated test cases May 16, 2022
@andreypopp andreypopp marked this pull request as ready for review May 16, 2022 21:26
@andreypopp
Copy link
Author

Alright, I've cleaned it up and added more tests.

The implementation is based on the code from Documenter.jl.

Allows to define test cases with REPL-simulated syntax:

    julia> 1
    1

This is useful as allows to define new test cases by simply copy pasting
real REPL sessions.
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

Successfully merging this pull request may close these issues.

None yet

2 participants