-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to change working directory for evaluation of example code (…
- Loading branch information
Showing
15 changed files
with
159 additions
and
25 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
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
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,19 @@ | ||
using Documenter | ||
|
||
const pages = [ | ||
"Home" => "index.md", | ||
"File" => "file.md", | ||
"Subdir" => "subdir/index.md", | ||
"Subfile" => "subdir/file.md", | ||
] | ||
|
||
@info "Building builds/default" | ||
makedocs(sitename="Test", pages = pages, build="builds/default") | ||
|
||
@info "Building builds/absolute" | ||
mkdir(joinpath(@__DIR__, "builds/absolute-workdir")) | ||
makedocs(sitename="Test", pages = pages, build="builds/absolute", workdir=joinpath(@__DIR__, "builds/absolute-workdir")) | ||
|
||
@info "Building builds/relative" | ||
mkdir(joinpath(@__DIR__, "builds/relative-workdir")) | ||
makedocs(sitename="Test", pages = pages, build="builds/relative", workdir="builds/relative-workdir") |
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,9 @@ | ||
# Testing | ||
|
||
Here's a test | ||
|
||
```@repl | ||
pwd() | ||
touch("root_file.txt") | ||
``` |
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,9 @@ | ||
# Testing | ||
|
||
Here's a test | ||
|
||
```@repl | ||
pwd() | ||
touch("root_index.txt") | ||
``` |
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,9 @@ | ||
# Testing | ||
|
||
Here's a test | ||
|
||
```@repl | ||
pwd() | ||
touch("subdir_file.txt") | ||
``` |
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,9 @@ | ||
# Testing | ||
|
||
Here's a test | ||
|
||
```@repl | ||
pwd() | ||
touch("subdir_index.txt") | ||
``` |
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,36 @@ | ||
using Test | ||
|
||
# for convenience, when debugging, the build step can be disabled when running the tests with | ||
# julia test/workdir/tests.jl skipbuild | ||
if !("skipbuild" in ARGS) | ||
rm(joinpath(@__DIR__, "builds"), recursive=true, force=true) # cleanup of previous test run | ||
include(joinpath(@__DIR__, "make.jl")) | ||
end | ||
|
||
@testset "makedocs workdir" begin | ||
# test for the default build | ||
@test isfile(joinpath(@__DIR__, "builds", "default", "root_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "default", "root_file.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "default", "subdir", "subdir_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "default", "subdir", "subdir_file.txt")) | ||
|
||
# absolute path | ||
@test !isfile(joinpath(@__DIR__, "builds", "absolute", "root_index.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "absolute", "root_file.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "absolute", "subdir", "subdir_index.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "absolute", "subdir", "subdir_file.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "absolute-workdir", "root_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "absolute-workdir", "root_file.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "absolute-workdir", "subdir_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "absolute-workdir", "subdir_file.txt")) | ||
|
||
# relative path | ||
@test !isfile(joinpath(@__DIR__, "builds", "relative", "root_index.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "relative", "root_file.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "relative", "subdir", "subdir_index.txt")) | ||
@test !isfile(joinpath(@__DIR__, "builds", "relative", "subdir", "subdir_file.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "relative-workdir", "root_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "relative-workdir", "root_file.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "relative-workdir", "subdir_index.txt")) | ||
@test isfile(joinpath(@__DIR__, "builds", "relative-workdir", "subdir_file.txt")) | ||
end |