From 59343b525df32141bdd5c6ac36ec3137b9f79129 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 30 Oct 2025 17:48:03 -0700 Subject: [PATCH] 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. --- tests/testsuite/print/relative_links/expected/print.html | 4 ++++ tests/testsuite/print/relative_links/src/second/nested.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/tests/testsuite/print/relative_links/expected/print.html b/tests/testsuite/print/relative_links/expected/print.html index b1e181b7..2dfbff20 100644 --- a/tests/testsuite/print/relative_links/expected/print.html +++ b/tests/testsuite/print/relative_links/expected/print.html @@ -9,6 +9,10 @@ both the print page and the non-print page.

A fragment link should work.

Link outside.

Link outside with anchor.

+

Link inside but doesn’t exist. +Link inside but doesn’t exist with anchor. +Link inside to html. +Link inside to html with anchor.

Some image

HTML Link

raw html diff --git a/tests/testsuite/print/relative_links/src/second/nested.md b/tests/testsuite/print/relative_links/src/second/nested.md index d8886203..443f00a2 100644 --- a/tests/testsuite/print/relative_links/src/second/nested.md +++ b/tests/testsuite/print/relative_links/src/second/nested.md @@ -11,6 +11,11 @@ Link [outside](../../std/foo/bar.html). Link [outside with anchor](../../std/foo/bar.html#panic). +Link [inside but doesn't exist](../first/alpha/beta.md). +Link [inside but doesn't exist with anchor](../first/alpha/beta.md#anchor). +Link [inside to html](../first/alpha/gamma.html). +Link [inside to html with anchor](../first/alpha/gamma.html#anchor). + ![Some image](../images/picture.png) HTML Link