From ef50c3a7b9d3c6f5f369ed749a2d0d113d98050e Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Wed, 31 Jul 2024 12:10:22 +0900 Subject: [PATCH] Update 'go test' completion --- src/_golang | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/_golang b/src/_golang index a5bf4ff..b2e2445 100644 --- a/src/_golang +++ b/src/_golang @@ -687,7 +687,7 @@ case $state in '*:importpaths:__go_packages' ;; - test) + (test) if [[ $words[$CURRENT] = -test.* ]]; then _arguments \ '-test.bench[run only benchmarks matching regexp]:regexp' \ @@ -746,11 +746,13 @@ case $state in '-memprofile[write a memory profile to file]:mem' \ '-memprofilerate[enable more precise memory profiles]:n' \ '-mutexprofile[write a mutex contention profile to the specified file]:file:_files' \ - '-outputdir[place output files from profiling in output dir]:dir' \ + '-mutexprofilefraction[sample 1 in n stack traces of goroutines holding a contended mutex]:n' \ + '-outputdir[place output files from profiling in output dir]:dir:_path_files -/' \ '-parallel[allow parallel execution of test functions]:n' \ '-run[run tests and examples matching the regular expression]:regexp' \ '-short[tell long-running tests to shorten their run time]' \ '-shuffle[randomize the execution order of tests and benchmarks]:type:(off on)' \ + '-skip[run only tests that do not match the regular expression]:pattern' \ '-test.-[specify options for test running]:test running options:' \ '-timeout[timeout long running tests]:t' \ '-trace[write an execution trace to the specified file]:trace' \ @@ -761,7 +763,7 @@ case $state in '-o[compile test binary to named file]:file:_files' \ '*:importpaths:__go_packages' fi - ;; + ;; (tool) local -a tools=($(go tool))