-
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.
- Loading branch information
Showing
5 changed files
with
91 additions
and
1 deletion.
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,4 @@ | ||
# Simple LaTeX build | ||
|
||
This build only contains a single paragraph of text to make sure that a | ||
near-empty LaTeX builds passes. |
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,27 @@ | ||
using Test | ||
|
||
# DOCUMENTER_TEST_EXAMPLES can be used to control which builds are performed in | ||
# make.jl, and we need to set it to the relevant LaTeX builds. | ||
ENV["DOCUMENTER_TEST_EXAMPLES"] = "latex_simple" | ||
|
||
# When the file is run separately we need to include make.jl which actually builds | ||
# the docs and defines a few modules that are referred to in the docs. The make.jl | ||
# has to be expected in the context of the Main module. | ||
if (@__MODULE__) === Main && !@isdefined examples_root | ||
include("make.jl") | ||
elseif (@__MODULE__) !== Main && isdefined(Main, :examples_root) | ||
using Documenter | ||
const examples_root = Main.examples_root | ||
elseif (@__MODULE__) !== Main && !isdefined(Main, :examples_root) | ||
error("examples/make.jl has not been loaded into Main.") | ||
end | ||
|
||
@testset "Examples/LaTeX" begin | ||
@testset "PDF/LaTeX: simple" begin | ||
doc = Main.examples_latex_simple_doc | ||
@test isa(doc, Documenter.Documents.Document) | ||
let build_dir = joinpath(examples_root, "builds", "latex_simple") | ||
@test joinpath(build_dir, "DocumenterLaTeXSimple.pdf") |> isfile | ||
end | ||
end | ||
end |