txtar: minor fix in unit test input
Change-Id: I7bb1caf63772a460206dd6ca0a35b11a61ca162f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/293531
Run-TryBot: Ian Lance Taylor <iant@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
diff --git a/txtar/archive_test.go b/txtar/archive_test.go
index 1f79f8d..7ac5ee9 100644
--- a/txtar/archive_test.go
+++ b/txtar/archive_test.go
@@ -70,7 +70,7 @@
{"file1", []byte("File 1 text.\n-- foo ---\nMore file 1 text.\n")},
{"file 2", []byte("File 2 text.\n")},
{"empty", []byte{}},
- {"noNL", []byte("hello world\n")},
+ {"noNL", []byte("hello world")},
},
},
wanted: `comment1
@@ -90,7 +90,7 @@
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := Format(tt.input)
- if !reflect.DeepEqual(string(result), tt.wanted) {
+ if string(result) != tt.wanted {
t.Errorf("Wrong output. \nGot:\n%s\nWant:\n%s\n", string(result), tt.wanted)
}
})