]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/testdir: update errors when filepaths include 'C:\'
authorthepudds <thepudds1460@gmail.com>
Fri, 18 Aug 2023 19:24:39 +0000 (15:24 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 20 Nov 2024 13:07:03 +0000 (13:07 +0000)
commit5d2cc5662027f6464db2781c88b4f3bb64f58136
tree86ec782f997eadc57095049d91b0fd9f330c64ed
parent5e1726b71a6485f5744db1c5533c847fa63163fd
cmd/internal/testdir: update errors when filepaths include 'C:\'

Currently on Windows, commands like:

 go test cmd/internal/testdir -run=foo -update_errors

will fail to update the errors because the parsing is
currently confused by the ':' in filepaths that
start with 'C:\', and wrongly thinks that ':' marks
the end of the Go filename.

Instead of finding the first ':', use a regexp
to find what looks to be the end of the Go filename.

Change-Id: I091106da55b8e9e9cf421814abf26a6f8b821af9
Reviewed-on: https://go-review.googlesource.com/c/go/+/524942
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/internal/testdir/testdir_test.go