Skip to content

Commit a33a164

Browse files
committed
Document g:OmniSharp_runtests_quickfix
1 parent 89b0dbb commit a33a164

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
@@ -388,6 +388,17 @@ test files in sequence instead, resulting in readable output in the
388388
|message-history|.
389389
Default: 1
390390

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

0 commit comments

Comments
 (0)