Open
Description
Note: I am talking about the vanilla "dap" debug test option that is registered (that I assume is supposed to debug the test file under the cursor) as opposed to the "debug an individual test" option.
Actions Taken
After installing nvim-dap-go (along with nvim-dap), while most debugging options work as expected, the "Debug test" option cannot build the test binary.
Steps to reproduce
- create a package containing one file and one test file
- ensure your cursor is in the test file
:lua require('dap').continue()
- select option 6 - "Debug test"
What Happened
Received an error building the test binary due to undefined functions in the test (that are definitely defined in the same package).
Build Error: go test -c -o /Users/grant/Projects/gotest/__debug_bin1012801603 -gcflags all=-N -l /Users/grant/Projects/gotest/pkg/somepackage/somemoretests_test.go
# command-line-arguments [command-line-arguments.test]
pkg/somepackage/somemoretests_test.go:6:13: undefined: UpperIt
pkg/somepackage/somemoretests_test.go:14:13: undefined: UpperIt (exit status 1)
It appears that when you try to test a single file, the required go files are not supplied alongside the test file:
go test somefile_test.go somefile.go
What I Expected to Happen
The tests are built and run successfully.
Metadata
Metadata
Assignees
Labels
No labels