Skip to content

Commit 37dcdfb

Browse files
committed
Don't check multiline testing outputs.
1 parent 54d779a commit 37dcdfb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

checks.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ func isSpecialBlock(comment string) bool {
230230
strings.Contains(comment, "#define")) {
231231
return true
232232
}
233-
if strings.HasPrefix(comment, "// Output: ") {
233+
if strings.HasPrefix(comment, "// Output:") ||
234+
strings.HasPrefix(comment, "// Unordered output:") {
234235
return true
235236
}
236237
return false

checks_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,15 @@ func TestIsSpecialBlock(t *testing.T) {
420420
isSpecial: true,
421421
},
422422
{
423-
name: "Test output",
423+
name: "Test testing output",
424424
comment: "// Output: true",
425425
isSpecial: true,
426426
},
427+
{
428+
name: "Test multiline testing output",
429+
comment: "// Output:\n// true\n// false",
430+
isSpecial: true,
431+
},
427432
}
428433

429434
for _, tt := range testCases {

0 commit comments

Comments
 (0)