Skip to content

Commit

Permalink
Add test for repeated text in markdown-link-eip
Browse files Browse the repository at this point in the history
  • Loading branch information
SamWilsn committed Jul 6, 2024
1 parent 4930ed4 commit 09d7de7
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion eipw-lint/tests/lint_markdown_link_eip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,29 @@ header: value1
}

#[tokio::test]
async fn link_text_missing_extended_section_description_with_huphen() {
async fn link_text_extended_section_description_with_bold() {
let src = r#"---
header: value1
---
[EIP-1: eip motivation**EIP-1: eip motivation**](./eip-1.md#eip-motivation)
"#;

let reports = Linter::<Text<String>>::default()
.clear_lints()
.deny(
"markdown-link-eip",
LinkEip(r"(eip-)([^.]*)\.md(#(.+))?$".to_string()),
)
.check_slice(None, src)
.run()
.await
.unwrap()
.into_inner();
assert_ne!(reports, "");
}

#[tokio::test]
async fn link_text_missing_extended_section_description_with_hyphen() {
let src = r#"---
header: value1
---
Expand Down

0 comments on commit 09d7de7

Please sign in to comment.