-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
94 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "DocumenterCitations" | ||
uuid = "daee34ce-89f3-4625-b898-19384cb65244" | ||
authors = ["Michael Goerz <[email protected]>"] | ||
version = "1.3.1" | ||
version = "1.3.2-dev" | ||
|
||
[deps] | ||
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" | ||
|
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,44 @@ | ||
using DocumenterCitations | ||
using Test | ||
using TestingUtilities: @Test # much better at comparing strings | ||
using IOCapture: IOCapture | ||
|
||
include("run_makedocs.jl") | ||
|
||
|
||
@testset "Check invalid url in .bib file " begin | ||
|
||
# https://github.com/JuliaDocs/DocumenterCitations.jl/issues/58 | ||
|
||
root = splitext(@__FILE__)[1] | ||
|
||
bib = CitationBibliography(joinpath(root, "src", "invalidlink.bib"), style=:numeric) | ||
|
||
run_makedocs( | ||
root; | ||
linkcheck=true, | ||
sitename="Test", | ||
plugins=[bib], | ||
pages=["Home" => "index.md", "References" => "references.md",], | ||
check_failure=true | ||
) do dir, result, success, backtrace, output | ||
|
||
@test !success | ||
@test contains(output, r"Error:.*http://www.invalid-server.doesnotexist/page.html") | ||
@test contains( | ||
output, | ||
"Error: linkcheck 'http://httpbin.org/status/404' status: 404." | ||
) | ||
@test contains( | ||
output, | ||
"Error: linkcheck 'http://httpbin.org/status/500' status: 500." | ||
) | ||
@test contains( | ||
output, | ||
"Error: linkcheck 'http://httpbin.org/status/403' status: 403." | ||
) | ||
@test contains(result.msg, "`makedocs` encountered an error [:linkcheck]") | ||
|
||
end | ||
|
||
end |
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,8 @@ | ||
# Testing link checks for broken links | ||
|
||
|
||
## Problem description | ||
|
||
The `linkcheck` option for `makedocs` should complain about [broken links](http://httpbin.org/status/403). | ||
|
||
Ref [GoerzPhd2015](@cite) contains broken links. |
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,8 @@ | ||
@phdthesis{GoerzPhd2015, | ||
Author = {Goerz, Michael}, | ||
Title = {Optimizing Robust Quantum Gates in Open Quantum Systems}, | ||
School = {Universität Kassel}, | ||
url = {http://www.invalid-server.doesnotexist/page.html}, | ||
Year = {2015}, | ||
note = {See \url{http://httpbin.org/status/404} for additional formats. Source available on \href{http://httpbin.org/status/500}{Github}}, | ||
} |
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,4 @@ | ||
## References | ||
|
||
```@bibliography | ||
``` |