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

Fix doctest output labelling #1028

Merged
merged 2 commits into from
May 27, 2019
Merged

Fix doctest output labelling #1028

merged 2 commits into from
May 27, 2019

Conversation

mortenpi
Copy link
Member

I find the current labeling of the outputs when printing a bit confusing. Currently it looks like:

┌ Error: doctest failure in src/showcase.md:17-20
│ 
│ ```jldoctest
│ julia> 2 + 2
│ 5
│ ```
│ 
│ Subexpression:
│ 
│ 2 + 2
│ 
│ Output:
│ 
│ 5
│ 
│ Expected output:
│ 
│ 4

I think "Expected output" should refer to the original doctest, since we expect the doctested code to match the docs. So this PR swaps them around and instead says:

┌ Error: doctest failure in src/showcase.md:17-20
│ 
│ ```jldoctest
│ julia> 2 + 2
│ 5
│ ```
│ 
│ Subexpression:
│ 
│ 2 + 2
│ 
│ Evaluated output:
│ 
│ 4
│ 
│ Expected output:
│ 
│ 5

@mortenpi mortenpi added this to the 0.23.0 milestone May 27, 2019
@mortenpi mortenpi requested a review from fredrikekre May 27, 2019 09:11
@mortenpi mortenpi merged commit 6e35c14 into master May 27, 2019
@mortenpi mortenpi deleted the mp/doctest-output branch May 27, 2019 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants