From f0a4a9e3c4fa80fc3bc859d883c1cffbcf7f1058 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 22 Jan 2024 16:50:55 -0500 Subject: [PATCH] lang: Don't print test comments if empty --- lang/interpret_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lang/interpret_test.go b/lang/interpret_test.go index 70c15a9c..9bae4487 100644 --- a/lang/interpret_test.go +++ b/lang/interpret_test.go @@ -163,7 +163,9 @@ func TestAstFunc1(t *testing.T) { return } comment := strings.TrimSpace(string(archive.Comment)) - t.Logf("comment: %s\n", comment) + if comment != "" { + t.Logf("comment: %s\n", comment) + } // copy files out into the test temp directory var testOutput []byte @@ -616,7 +618,9 @@ func TestAstFunc2(t *testing.T) { return } comment := strings.TrimSpace(string(archive.Comment)) - t.Logf("comment: %s\n", comment) + if comment != "" { + t.Logf("comment: %s\n", comment) + } // copy files out into the test temp directory var testOutput []byte @@ -1394,7 +1398,9 @@ func TestAstFunc3(t *testing.T) { return } comment := strings.TrimSpace(string(archive.Comment)) - t.Logf("comment: %s\n", comment) + if comment != "" { + t.Logf("comment: %s\n", comment) + } // copy files out into the test temp directory var testOutput []byte