fix: coverage command should be coverprofile #296 (#299)

* fix: coverage command should be coverprofile

* refactor: README
This commit is contained in:
Yohanes Bandung Bondowoso 2023-02-21 22:51:10 +07:00 committed by GitHub
parent 750b5e5603
commit 595cd561e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 12 deletions

View File

@ -328,16 +328,26 @@ Support table based unit test auto generate, parse current function/method name
GoTestXXX Arguments
| arguments | Description |
| ------------------------ | ------------------------------------------------------- |
| -v | verbose mode |
| -c | compile |
| -t | tags |
| -b | bench |
| -F | floaterm mode |
| arguments | Description |
| ------------ | --------------------------------- |
| -v | verbose mode |
| -c | compile |
| -C | coverprofile |
| -n | count |
| -t | tags |
| -f | fuzz |
| -b | bench |
| -m | metric |
| -s | select |
| -p | package |
| -F | floaterm mode |
| -a | args |
Note: For GoTestXXX
You can add available arguments e.g. `GoTest -tags=integration ./internal/web -bench=. -count=1 -`
You can add available arguments with long name or character flag e.g. `GoTest -tags=integration ./internal/web -b=. -count=1 -`
You can also add other unmapped arguments after the `-a` or `-args` flag `GoTest -a mock=true`
## GoCheat

View File

@ -21,7 +21,7 @@ local extract_filepath = util.extract_filepath
local long_opts = {
verbose = "v",
compile = "c",
coverage = 'C',
coverprofile = 'C',
tags = "t",
args = "a",
count = "n",
@ -146,7 +146,7 @@ function M.make(...)
end
if optarg["C"] then
table.insert(cmd, "-coverage=" .. optarg["C"])
table.insert(cmd, "-coverprofile=" .. optarg["C"])
end
if optarg["f"] == 'uzz' then
log("fuzz test")

View File

@ -13,7 +13,7 @@ local vfn = vim.fn
local long_opts = {
verbose = 'v',
compile = 'c',
coverage = 'C',
coverprofile = 'C',
count = 'n',
tags = 't',
fuzz = 'f',
@ -242,7 +242,7 @@ M.test = function(...)
local test_opts = {
verbose = 'v',
compile = 'c',
coverage = 'C',
coverprofile = 'C',
tags = 't',
bench = 'b',
metrics = 'm',