Skip to content

Commit 23c5e48

Browse files
committed
cmd/cgo/internal/testshared: strip newline from gccgo -dumpversion
Otherwise, gccgo tests may be quietly skipped. For #60798 Change-Id: Iaad6b53c95ad4d407b917d8f62978979b82a4e81 Reviewed-on: https://go-review.googlesource.com/c/go/+/503495 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Paul Murphy <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent cf7ae4f commit 23c5e48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/cgo/internal/testshared/shared_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ func requireGccgo(t *testing.T) {
748748
if dot > 0 {
749749
output = output[:dot]
750750
}
751-
major, err := strconv.Atoi(string(output))
751+
major, err := strconv.Atoi(strings.TrimSpace(string(output)))
752752
if err != nil {
753753
t.Skipf("can't parse gccgo version number %s", output)
754754
}

0 commit comments

Comments
 (0)