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

Automatically check if README.md examples are working when running "cargo test" #145

Merged
merged 1 commit into from
May 2, 2019

Conversation

GuillaumeGomez
Copy link
Member

Since rustdoc nightly now provides "cfg(test)" when running on test mode, we can now use this macro on test mode only to check if README.md examples are working as expected.

@GuillaumeGomez
Copy link
Member Author

I don't know how to support rust 1.24 though... There is no way to check for the current rust version (unless checking it into the build.rs?) because rust 2015 (and 2018 of course) are working fine. If anyone has an idea...

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Apr 28, 2019

My last update seems like it fixed it. :)

Copy link
Contributor

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Thanks @GuillaumeGomez

@KodrAus KodrAus merged commit 65d58f1 into rust-lang-nursery:master May 2, 2019
@GuillaumeGomez GuillaumeGomez deleted the doc-tests branch May 2, 2019 07:53
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