Skip to content

Commit ef143e8

Browse files
committed
Document g:OmniSharp_runtests_quickfix
1 parent f2c4499 commit ef143e8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

autoload/OmniSharp/actions/test.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function! s:run.single.complete(summary) abort
159159
else
160160
echomsg location.name . ': failed'
161161
let title = 'Test failure: ' . location.name
162-
if get(g:, 'OmniSharp_test_quickfix', 1) == 0 | return | endif
162+
if get(g:, 'OmniSharp_runtests_quickfix', 0) == 0 | return | endif
163163
let what = {}
164164
if len(a:summary.locations) > 1
165165
let what.quickfixtextfunc = {info->
@@ -274,7 +274,7 @@ function! s:run.multiple.complete(summary) abort
274274
endif
275275
call s:utils.log.warn(title)
276276
endif
277-
if get(g:, 'OmniSharp_test_quickfix', 1) == 0 | return | endif
277+
if get(g:, 'OmniSharp_runtests_quickfix', 0) == 0 | return | endif
278278
call OmniSharp#locations#SetQuickfix(locations, title)
279279
endfunction
280280

doc/omnisharp-vim.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,17 @@ test files in sequence instead, resulting in readable output in the
389389
|message-history|.
390390
Default: 1
391391

392+
*g:OmniSharp_runtests_quickfix*
393+
When running unit tests with |:OmniSharpRunTest| and |:OmniSharpRunTestsInFile|
394+
or from the |omnisharp-testrunner|, populate the quickfix list with test
395+
results.
396+
When a single test is run and an exception occurs, the quickfix will be
397+
populated with the exception stack trace.
398+
When multiple tests are run then each test will get a quickfix location:
399+
failed test locations point to the failed assertion; successful test locations
400+
point to the test method declaration.
401+
Default: 0
402+
392403
-------------------------------------------------------------------------------
393404
3.6 INTEGRATIONS *omnisharp-integration-options*
394405

0 commit comments

Comments
 (0)