From 4a57386919d4979c736adc3f31db70c09856b4b0 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 5 Oct 2022 09:50:19 +0800 Subject: [PATCH 1/2] fix missing m.Run() --- modules/markup/html_test.go | 2 ++ modules/markup/markdown/markdown_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index a7cf81250bf0e..c2f8cfc5dbea6 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -7,6 +7,7 @@ package markup_test import ( "context" "io" + "os" "strings" "testing" @@ -32,6 +33,7 @@ func TestMain(m *testing.M) { if err := git.InitSimple(context.Background()); err != nil { log.Fatal("git init failed, err: %v", err) } + os.Exit(m.Run()) } func TestRender_Commits(t *testing.T) { diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go index 732fe1a6beff9..4fc6ec7c3ff6e 100644 --- a/modules/markup/markdown/markdown_test.go +++ b/modules/markup/markdown/markdown_test.go @@ -6,6 +6,7 @@ package markdown_test import ( "context" + "os" "strings" "testing" @@ -37,6 +38,7 @@ func TestMain(m *testing.M) { if err := git.InitSimple(context.Background()); err != nil { log.Fatal("git init failed, err: %v", err) } + os.Exit(m.Run()) } func TestRender_StandardLinks(t *testing.T) { From 9d9c8ccad15ec628d095ebef843c26b06dbb5ac1 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 5 Oct 2022 10:02:39 +0800 Subject: [PATCH 2/2] fix emoji test --- modules/markup/html_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index c2f8cfc5dbea6..f0dd79da71929 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -338,7 +338,7 @@ func TestRender_emoji(t *testing.T) { `

Some text with 😄😄 2 emoji next to each other

`) test( "😎ðŸĪŠðŸ”ðŸĪ‘❓", - `

😎ðŸĪŠðŸ”ðŸĪ‘❓

`) + `

😎ðŸĪŠðŸ”ðŸĪ‘❓

`) // should match nothing test(