From 452920ff17c3a8b79136b949991fab0453256eb6 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Fri, 23 Jun 2023 22:25:21 -0400 Subject: [PATCH] first round of unit tests --- wikilink_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wikilink_test.go b/wikilink_test.go index e4fd37e..5926e34 100644 --- a/wikilink_test.go +++ b/wikilink_test.go @@ -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"}, } /*