From 462464e47e3c3481971ecf15a246d72d3d51afd9 Mon Sep 17 00:00:00 2001 From: Azareal Date: Thu, 11 Jul 2019 17:20:33 +1000 Subject: [PATCH] Remember to init the emojis. Init the parser tests properly. --- main.go | 8 ++++++++ parser_test.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/main.go b/main.go index d43a686c..25d2c376 100644 --- a/main.go +++ b/main.go @@ -134,11 +134,19 @@ func storeInit() (err error) { if err != nil { return errors.WithStack(err) } + /*c.Convos, err = c.NewDefaultConversationStore(acc) + if err != nil { + return errors.WithStack(err) + }*/ err = phrases.InitPhrases(c.Site.Language) if err != nil { return errors.WithStack(err) } + err = c.InitEmoji() + if err != nil { + return errors.WithStack(err) + } log.Print("Loading the static files.") err = c.Themes.LoadStaticFiles() diff --git a/parser_test.go b/parser_test.go index acf9a705..21d88a54 100644 --- a/parser_test.go +++ b/parser_test.go @@ -9,6 +9,10 @@ import ( ) func TestPreparser(t *testing.T) { + miscinit(t) + if !c.PluginsInited { + c.InitPlugins() + } var msgList = &METriList{nil} // Note: The open tag is evaluated without knowledge of the close tag for efficiency and simplicity, so the parser autofills the associated close tag when it finds an open tag without a partner @@ -131,6 +135,10 @@ func TestPreparser(t *testing.T) { } func TestParser(t *testing.T) { + miscinit(t) + if !c.PluginsInited { + c.InitPlugins() + } var msgList = &METriList{nil} url := "github.com/Azareal/Gosora"