cleaning tests up

main v0.1.2
Nick Dumas 11 months 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 {
mut, test := mutateTestCase(
tc,

Loading…
Cancel
Save