未验证 提交 0da1c9a9 编写于 作者: A Alessandro Arzilli 提交者: GitHub

Documentation: document passing arguments to the test program (#2459)

Add documentation on how to pass arguments to the program generated by
`dlv test`.

Fixes #2458
上级 c6e52ecf
......@@ -10,7 +10,11 @@ Compiles a test binary with optimizations disabled and begins a new debug sessio
The test command allows you to begin a new debug session in the context of your
unit tests. By default Delve will debug the tests in the current directory.
Alternatively you can specify a package name, and Delve will debug the tests in
that package instead.
that package instead. Double-dashes `--` can be used to pass arguments to the test program:
dlv test [package] -- -test.v -other-argument
See also: 'go help testflag'.
```
dlv test [package]
......
......@@ -253,7 +253,11 @@ or later, -gcflags="-N -l" on earlier versions of Go.`,
The test command allows you to begin a new debug session in the context of your
unit tests. By default Delve will debug the tests in the current directory.
Alternatively you can specify a package name, and Delve will debug the tests in
that package instead.`,
that package instead. Double-dashes ` + "`--`" + ` can be used to pass arguments to the test program:
dlv test [package] -- -test.v -other-argument
See also: 'go help testflag'.`,
Run: testCmd,
}
testCommand.Flags().String("output", "debug.test", "Output path for the binary.")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册