Skip to content

Commit e1529cd

Browse files
committed
Document g:OmniSharp_runtests_quickfix
1 parent 667df18 commit e1529cd

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
@@ -405,6 +405,17 @@ test files in sequence instead, resulting in readable output in the
405405
|message-history|.
406406
Default: 1
407407

408+
*g:OmniSharp_runtests_quickfix*
409+
When running unit tests with |:OmniSharpRunTest| and |:OmniSharpRunTestsInFile|
410+
or from the |omnisharp-testrunner|, populate the quickfix list with test
411+
results.
412+
When a single test is run and an exception occurs, the quickfix will be
413+
populated with the exception stack trace.
414+
When multiple tests are run then each test will get a quickfix location:
415+
failed test locations point to the failed assertion; successful test locations
416+
point to the test method declaration.
417+
Default: 0
418+
408419
-------------------------------------------------------------------------------
409420
3.6 INTEGRATIONS *omnisharp-integration-options*
410421

0 commit comments

Comments
 (0)