Skip to content

Commit 59343b5

Browse files
committed
Add test for print relative for page that doesn't exist
An example where this can happen is a link to a page that was renamed and redirected, or just a normal HTML file.
1 parent e8d7dd6 commit 59343b5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/testsuite/print/relative_links/expected/print.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ <h1 id="testing-relative-links-for-the-print-page"><a class="header" href="#test
99
<p>A <a href="#some-section">fragment link</a> should work.</p>
1010
<p>Link <a href="../std/foo/bar.html">outside</a>.</p>
1111
<p>Link <a href="../std/foo/bar.html#panic">outside with anchor</a>.</p>
12+
<p>Link <a href="../first/alpha/beta.html">inside but doesn’t exist</a>.
13+
Link <a href="#anchor">inside but doesn’t exist with anchor</a>.
14+
Link <a href="../first/alpha/gamma.html">inside to html</a>.
15+
Link <a href="#anchor">inside to html with anchor</a>.</p>
1216
<p><img src="images/picture.png" alt="Some image"></p>
1317
<p><a href="#first-nested">HTML Link</a></p>
1418
<img src="images/picture.png" alt="raw html">

tests/testsuite/print/relative_links/src/second/nested.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Link [outside](../../std/foo/bar.html).
1111

1212
Link [outside with anchor](../../std/foo/bar.html#panic).
1313

14+
Link [inside but doesn't exist](../first/alpha/beta.md).
15+
Link [inside but doesn't exist with anchor](../first/alpha/beta.md#anchor).
16+
Link [inside to html](../first/alpha/gamma.html).
17+
Link [inside to html with anchor](../first/alpha/gamma.html#anchor).
18+
1419
![Some image](../images/picture.png)
1520

1621
<a href="../first/nested.md">HTML Link</a>

0 commit comments

Comments
 (0)