From f512cf96210bb039b148e06c986e21f90d4398e9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Jul 2023 15:25:24 +0200 Subject: [PATCH] Remove html anchor from fragment test --- fixtures/fragments/file1.md | 11 +++++++++-- lychee-bin/tests/cli.rs | 6 ++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/fixtures/fragments/file1.md b/fixtures/fragments/file1.md index e247991e36..2d733b769d 100644 --- a/fixtures/fragments/file1.md +++ b/fixtures/fragments/file1.md @@ -16,13 +16,20 @@ This is a test file for the fragment loader. [Link to missing fragment in file2](file2.md#missing-fragment) -## Fragment 4 +## HTML Fragments +Explicit fragment links are currently not supported. +Therefore we put the test into a code block for now to prevent false positives. + +``` [Link to explicit fragment](#explicit-fragment) +``` + +## Custom Fragments -[Link to explicit fragment in file2](file2.md#custom-id) +[Custom fragment id in file2](file2.md#custom-id) # Kebab Case Fragment diff --git a/lychee-bin/tests/cli.rs b/lychee-bin/tests/cli.rs index 6785b42c43..30924ca3da 100644 --- a/lychee-bin/tests/cli.rs +++ b/lychee-bin/tests/cli.rs @@ -1368,8 +1368,10 @@ mod cli { .stderr(contains( "fixtures/fragments/file1.md#kebab-case-fragment-1", )) - .stdout(contains("8 Total")) - .stdout(contains("6 OK")); + .stdout(contains("7 Total")) + .stdout(contains("5 OK")) + // 2 failures because of missing fragments + .stdout(contains("2 Errors")); } #[test]