mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
9eb353543b
commit
4b19790092
|
|
@ -70,7 +70,7 @@ func TestFormat(t *testing.T) {
|
|||
{"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 @@ hello world
|
|||
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)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue