lang: Don't print test comments if empty

This commit is contained in:
James Shubin
2024-01-22 16:50:55 -05:00
parent 78e59a9400
commit f0a4a9e3c4

View File

@@ -163,7 +163,9 @@ func TestAstFunc1(t *testing.T) {
return return
} }
comment := strings.TrimSpace(string(archive.Comment)) comment := strings.TrimSpace(string(archive.Comment))
if comment != "" {
t.Logf("comment: %s\n", comment) t.Logf("comment: %s\n", comment)
}
// copy files out into the test temp directory // copy files out into the test temp directory
var testOutput []byte var testOutput []byte
@@ -616,7 +618,9 @@ func TestAstFunc2(t *testing.T) {
return return
} }
comment := strings.TrimSpace(string(archive.Comment)) comment := strings.TrimSpace(string(archive.Comment))
if comment != "" {
t.Logf("comment: %s\n", comment) t.Logf("comment: %s\n", comment)
}
// copy files out into the test temp directory // copy files out into the test temp directory
var testOutput []byte var testOutput []byte
@@ -1394,7 +1398,9 @@ func TestAstFunc3(t *testing.T) {
return return
} }
comment := strings.TrimSpace(string(archive.Comment)) comment := strings.TrimSpace(string(archive.Comment))
if comment != "" {
t.Logf("comment: %s\n", comment) t.Logf("comment: %s\n", comment)
}
// copy files out into the test temp directory // copy files out into the test temp directory
var testOutput []byte var testOutput []byte