Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions test/examples/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,6 @@ julia> x->x # ignore error on 0.7
r = :a
```

# Bad links (Windows)

* [Colons not allowed on Windows -- `some:path`](some:path)
* [No "drive" -- `:path`](:path)
* [Absolute Windows paths -- `X:\some\path`](X:\some\path)

# Rendering text/markdown

```@example
Expand Down
45 changes: 45 additions & 0 deletions test/warnings/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,51 @@ julia> WarningTests.run_warnings_test("dollar")
"""
module UnbalancedDollarWarningTests end

@doc raw"""
```jldoctest; setup=:(using ..WarningTests)
julia> WarningTests.run_warnings_test("windows_paths")
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
┌ Warning: invalid local link/image: file does not exist in src/windows_paths.md
│ link =
│ @ast MarkdownAST.Link("some:path", "") do
│ MarkdownAST.Text("Colons not allowed on Windows ")
│ MarkdownAST.Text("–")
│ MarkdownAST.Text(" ")
│ MarkdownAST.Code("some:path")
│ end
└ @ Documenter
┌ Warning: invalid local link/image: file does not exist in src/windows_paths.md
│ link =
│ @ast MarkdownAST.Link(":path", "") do
│ MarkdownAST.Text("No 'drive' ")
│ MarkdownAST.Text("–")
│ MarkdownAST.Text(" ")
│ MarkdownAST.Code(":path")
│ end
└ @ Documenter
┌ Warning: invalid local link/image: file does not exist in src/windows_paths.md
│ link =
│ @ast MarkdownAST.Link("X:\\some\\path", "") do
│ MarkdownAST.Text("Absolute Windows paths ")
│ MarkdownAST.Text("–")
│ MarkdownAST.Text(" ")
│ MarkdownAST.Code("X:\\some\\path")
│ end
└ @ Documenter
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
```
"""
module WindowsPathSeparatorWarningTests end

fixtests = haskey(ENV, "DOCUMENTER_FIXTESTS")

# run the doctests in Julia >= 1.10 (some outputs have minor difference in
Expand Down
7 changes: 7 additions & 0 deletions test/warnings/src/windows_paths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Bad links (Windows)

Added in PR #485.

* [Colons not allowed on Windows -- `some:path`](some:path)
* [No 'drive' -- `:path`](:path)
* [Absolute Windows paths -- `X:\some\path`](X:\some\path)
Loading