cleaning tests up

main v0.1.2
Nick Dumas 1 year ago
parent 8602e2e16e
commit 9de66ba0da

@ -272,7 +272,41 @@ var singleWikilink = []tc{
}, },
} }
func Test_ObsidianWikilinks_LinksWithEscapeCharacters(t *testing.T) { func Test_ObsidianWikilinks_TextWithEscapeCharacters(t *testing.T) {
for _, tc := range singleWikilink {
tc.name = "escape characters preceding " + tc.name
mut, test := mutateTestCase(
tc,
`foo\[\[not a link, but this is`,
"",
[]markdown.Lexeme{
{Typ: markdown.LexText, Val: `foo\[\[not a link, but this is`},
},
[]markdown.Lexeme{
{Typ: markdown.LexText, Val: ""},
},
)
t.Run(mut.name, test)
}
for _, tc := range singleWikilink {
tc.name = "escape characters following " + tc.name
mut, test := mutateTestCase(
tc,
"",
`foo\[\[not a link, but this is`,
[]markdown.Lexeme{
{Typ: markdown.LexText, Val: ""},
},
[]markdown.Lexeme{
{Typ: markdown.LexText, Val: `foo\[\[not a link, but this is`},
},
)
t.Run(mut.name, test)
}
}
func Test_ObsidianWikilinks_EscapeCharacters(t *testing.T) {
for _, tc := range wikilinkWithEscapeCharacters { for _, tc := range wikilinkWithEscapeCharacters {
mut, test := mutateTestCase( mut, test := mutateTestCase(
tc, tc,

Loading…
Cancel
Save