Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Test file paths not expanded in subtests #1049

Closed
rpeshkov opened this issue Jun 21, 2017 · 4 comments
Closed

Test file paths not expanded in subtests #1049

rpeshkov opened this issue Jun 21, 2017 · 4 comments

Comments

@rpeshkov
Copy link
Contributor

Hi vscode-go developers! I've taken your function for expanding file paths in go test output into my plugin and found a bug there.

Steps to reproduce:

  1. Create test with subtest and error output, i.e.
func TestIt(t *testing.T) {
	t.Run("SubTest", func(tin *testing.T) {
		tin.Error("Hi, i am not expanded")
	})
}
  1. Launch test.

  2. Look at path in output. It's not expanded

--- FAIL: TestIt (0.00s)
    --- FAIL: TestIt/SubTest (0.00s)
    	goissue_test.go:7: Hi, i am not expanded

Expected:
goissue_test.go:7 -> /Users/user/go/src/github.com/user/goissue/goissue_test.go:7

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @rpeshkov!

This should be an easy regex fix in https://github.com/Microsoft/vscode-go/blob/master/src/goTest.ts#L298

PRs welcome

@rpeshkov
Copy link
Contributor Author

Yep, sure.

@ramya-rao-a
Copy link
Contributor

Closing as this is fixed with #1055
The fix will be out in the next update in the next few days

@ramya-rao-a
Copy link
Contributor

The fix is now out in the latest update (0.6.63) to the Go extension

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants