diff options
| author | Dan Kortschak <dan@kortschak.io> | 2022-04-25 15:40:00 +0930 |
|---|---|---|
| committer | Dan Kortschak <dan@kortschak.io> | 2022-05-20 23:05:38 +0000 |
| commit | c3470ca83cfdbcc71ce162b00d6b9a0004a7f649 (patch) | |
| tree | 7d4290f1ff3e5e9b3c45372a035e1940bcab45a7 /src/internal/fuzz/encoding_test.go | |
| parent | 2b0e457b42a64455ca2d3eebb5c6d4e6acfc5db2 (diff) | |
| download | go-c3470ca83cfdbcc71ce162b00d6b9a0004a7f649.tar.xz | |
internal/fuzz: trim carriage return from version line
On windows hosts, when code is checked out using git with the default
setting of autocrlf=true, carriage returns are appended to source lines
which then prevent the version check from being successful. This removes
carriage returns to allow version matching.
Fixes #52268
Change-Id: I9acc4e907c93a20305f8742cc01687a122a88645
Reviewed-on: https://go-review.googlesource.com/c/go/+/402074
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dan Kortschak <dan@kortschak.io>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/internal/fuzz/encoding_test.go')
| -rw-r--r-- | src/internal/fuzz/encoding_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal/fuzz/encoding_test.go b/src/internal/fuzz/encoding_test.go index 8e3800eb77..6f6173d7e0 100644 --- a/src/internal/fuzz/encoding_test.go +++ b/src/internal/fuzz/encoding_test.go @@ -214,6 +214,11 @@ uint(18446744073709551615)` } }(), }, + { + desc: "windows new line", + in: "go test fuzz v1\r\nint(0)\r\n", + want: "go test fuzz v1\nint(0)", + }, } for _, test := range tests { t.Run(test.desc, func(t *testing.T) { |
