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

Add tests for README file #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GuillaumeGomez
Copy link

It allows to test code examples in the README.md file.

@dguo
Copy link
Member

dguo commented Jul 23, 2019

Hi, should the tests be showing up in the CI output? I don't see them.

@GuillaumeGomez
Copy link
Author

It only works on nightly for the moment. Also, I need to update this PR since it's not #[cfg(test)] anymore... I'll add a run for cargo test on your CI script as well.

@GuillaumeGomez
Copy link
Author

For the time being, you can run the readme doc tests by using the "readme" feature (if we're lucky, doctest should be stabilized pretty quickly...) by doing:

cargo test --features readme

And normally you should see with the tests output:

test <::doc_comment::doc_comment macros> -  (line 65) ... ok
test <::doc_comment::doc_comment macros> -  (line 31) ... ok

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.

2 participants