-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-enable README tests in a cleverer way
This change borrows the core idea from the [doc-comment crate](https://github.com/GuillaumeGomez/doc-comment/) to run the README examples as doctests by wholesale including README.md via `include_str!`. The resulting docs are on an empty module marked as `#[doc(hidden)]` and I've also made them only run when the `derive` feature is enabled because AFAIK there isn't a good way to disable individual tests in a single item depending on features. This should still be useful since scroll's CI tests with that feature enabled so it'll ensure that the examples in the README continue to work! Since the examples are being run as standard rusttests now I was able to do a little bit of cleanup on them as well.
- Loading branch information
Showing
3 changed files
with
19 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.