-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doctest() can now also doctest manual pages, which makes it easier to include doctesting as part of the test suite, and behaves like a testset.
- Loading branch information
Showing
8 changed files
with
219 additions
and
100 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Hidden showcase page | ||
|
||
Currently exists just so that there would be doctests to run in manual pages of Documenter's | ||
manual. This page does not show up in navigation. | ||
|
||
```jldoctest | ||
julia> 2 + 2 | ||
4 | ||
``` | ||
|
||
The following doctests needs doctestsetup: | ||
|
||
```jldoctest; setup=:(using Documenter) | ||
julia> Documenter.Utilities.splitexpr(:(Foo.Bar.baz)) | ||
(:(Foo.Bar), :(:baz)) | ||
``` | ||
|
||
Let's also try `@meta` blocks: | ||
|
||
```@meta | ||
DocTestSetup = quote | ||
f(x) = x^2 | ||
end | ||
``` | ||
|
||
```jldoctest | ||
julia> f(2) | ||
4 | ||
``` | ||
|
||
```@meta | ||
DocTestSetup = nothing | ||
``` |
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
Oops, something went wrong.