From 4235beff81f88b2f87e79baea8a507da7694dd63 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Tue, 4 Jul 2023 08:48:09 -0400 Subject: [PATCH] can't assume this empty token will be there anymore --- lexer_test.go | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/lexer_test.go b/lexer_test.go index 5b9b2a2..45ec8f8 100644 --- a/lexer_test.go +++ b/lexer_test.go @@ -16,7 +16,6 @@ var testCases = []tc{ {Typ: wikilink.LexOpenLink, Val: "[["}, {Typ: wikilink.LexIdent, Val: "wikilink"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -28,7 +27,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "display name"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -42,7 +40,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -56,7 +53,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -66,7 +62,6 @@ var testCases = []tc{ {Typ: wikilink.LexOpenLink, Val: "[["}, {Typ: wikilink.LexIdent, Val: "wikilink spaces"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -78,7 +73,6 @@ var testCases = []tc{ {Typ: wikilink.LexHeading, Val: "#"}, {Typ: wikilink.LexIdent, Val: "heading"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -90,7 +84,6 @@ var testCases = []tc{ {Typ: wikilink.LexHeading, Val: "#"}, {Typ: wikilink.LexIdent, Val: "heading"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -104,7 +97,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "display name"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -120,7 +112,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -136,7 +127,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -148,7 +138,6 @@ var testCases = []tc{ {Typ: wikilink.LexBlockRef, Val: "#^"}, {Typ: wikilink.LexIdent, Val: "blockRef"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -160,7 +149,6 @@ var testCases = []tc{ {Typ: wikilink.LexBlockRef, Val: "#^"}, {Typ: wikilink.LexIdent, Val: "blockRef"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -174,7 +162,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "display name"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -190,7 +177,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, { @@ -206,7 +192,6 @@ var testCases = []tc{ {Typ: wikilink.LexAlias, Val: "|"}, {Typ: wikilink.LexIdent, Val: "second pipe"}, {Typ: wikilink.LexCloseLink, Val: "]]"}, - {Typ: wikilink.LexText, Val: ""}, }, }, } @@ -255,7 +240,9 @@ func Test_ObsidianWikilinks_Basic(t *testing.T) { []wikilink.Lexeme{ {Typ: wikilink.LexText, Val: ""}, }, - nil, + []wikilink.Lexeme{ + {Typ: wikilink.LexText, Val: ""}, + }, ) t.Run(mut.name, test) }