first round of unit tests

dev
Nick Dumas 2 years ago
parent c3b5d8e663
commit 452920ff17

@ -24,6 +24,11 @@ func Test_Extract_Link(t *testing.T) {
{name: "wikilink#heading|display name", in: "[[wikilink#heading|display name]]", expected: "wikilink"},
{name: "wikilink#heading|display name", in: "[[wikilink#heading|display name]]", expected: "wikilink"},
{name: "wikilink with numeric aliases#heading|420|display name", in: "[[wikilink#heading|420|second pipe]]", expected: "wikilink"},
{name: "^blockRef", in: "[[^blockRef]]", expected: ""},
{name: "wikilink^blockRef", in: "[[wikilink^blockRef]]", expected: "wikilink"},
{name: "wikilink^blockRef|display name", in: "[[wikilink#^blockRef|display name]]", expected: "wikilink"},
{name: "wikilink^blockRef|display name|second pipe", in: "[[wikilink#^blockRef|display name|second pipe]]", expected: "wikilink"},
{name: "wikilink with numeric aliases^blockRef|420|second pipe", in: "[[wikilink#^blockRef|420|second pipe]]", expected: "wikilink"},
}
/*

Loading…
Cancel
Save