Skip to content

Commit

Permalink
Remove html anchor from fragment test
Browse files Browse the repository at this point in the history
  • Loading branch information
mre committed Jul 17, 2023
1 parent bc102b5 commit f512cf9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 9 additions & 2 deletions fixtures/fragments/file1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
<a name="explicit-fragment"></a>
[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

Expand Down
6 changes: 4 additions & 2 deletions lychee-bin/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f512cf9

Please sign in to comment.