From 37dcdfbe7770037f14c40a63ad8a2ccdad008bed Mon Sep 17 00:00:00 2001 From: Denis Krivak Date: Sat, 7 Sep 2024 14:39:09 +0200 Subject: [PATCH] Don't check multiline testing outputs. --- checks.go | 3 ++- checks_test.go | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/checks.go b/checks.go index 0e53c22..b402987 100644 --- a/checks.go +++ b/checks.go @@ -230,7 +230,8 @@ func isSpecialBlock(comment string) bool { strings.Contains(comment, "#define")) { return true } - if strings.HasPrefix(comment, "// Output: ") { + if strings.HasPrefix(comment, "// Output:") || + strings.HasPrefix(comment, "// Unordered output:") { return true } return false diff --git a/checks_test.go b/checks_test.go index 92057d6..1e3f158 100644 --- a/checks_test.go +++ b/checks_test.go @@ -420,10 +420,15 @@ func TestIsSpecialBlock(t *testing.T) { isSpecial: true, }, { - name: "Test output", + name: "Test testing output", comment: "// Output: true", isSpecial: true, }, + { + name: "Test multiline testing output", + comment: "// Output:\n// true\n// false", + isSpecial: true, + }, } for _, tt := range testCases {