|
|
@ -196,6 +196,48 @@ var testCases = []tc{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func Test_ObsidianWikilinks_LinksEndOfMultiLineInput(t *testing.T) {
|
|
|
|
|
|
|
|
for _, tc := range testCases {
|
|
|
|
|
|
|
|
mut, test := mutateTestCase(
|
|
|
|
|
|
|
|
tc,
|
|
|
|
|
|
|
|
" test data please ignore.\nbling blonk more lines\nbling blong\nthis is a",
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[]wikilink.Lexeme{
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: " test data please ignore.\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "bling blonk more lines\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "bling blong\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "this is a"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
[]wikilink.Lexeme{
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: ""},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
t.Run(mut.name, test)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func Test_ObsidianWikilinks_LinksStartOfMultiLineInput(t *testing.T) {
|
|
|
|
|
|
|
|
for _, tc := range testCases {
|
|
|
|
|
|
|
|
mut, test := mutateTestCase(
|
|
|
|
|
|
|
|
tc,
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
" test data please ignore.\nbling blonk more lines\nbling blong\nthis is a",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[]wikilink.Lexeme{
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: ""},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
[]wikilink.Lexeme{
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: " test data please ignore.\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "bling blonk more lines\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "bling blong\n"},
|
|
|
|
|
|
|
|
{Typ: wikilink.LexText, Val: "this is a"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
t.Run(mut.name, test)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func Test_ObsidianWikilinks_LinksStartOfInput(t *testing.T) {
|
|
|
|
func Test_ObsidianWikilinks_LinksStartOfInput(t *testing.T) {
|
|
|
|
for _, tc := range testCases {
|
|
|
|
for _, tc := range testCases {
|
|
|
|
mut, test := mutateTestCase(
|
|
|
|
mut, test := mutateTestCase(
|
|
|
|