@@ -25,7 +25,9 @@ CONTENTS *omnisharp-contents
25
25
3.7 Miscellaneous ....................... |omnisharp-miscellaneous-options|
26
26
4. Commands ............................... |omnisharp-commands|
27
27
5. Autocmds ............................... |omnisharp-autocmds|
28
- 6. Integrations ........................... |omnisharp-integrations|
28
+ 6. Test runner ............................ |omnisharp-testrunner|
29
+ 6.1 Mappings ............................ |omnisharp-testrunner-mappings|
30
+ 7. Integrations ........................... |omnisharp-integrations|
29
31
30
32
===============================================================================
31
33
1. DEPENDENCIES *omnisharp-dependencies*
@@ -43,7 +45,7 @@ Optional:~
43
45
2. USAGE *omnisharp-usage*
44
46
45
47
Opening a `*.cs` file will automatically start an instance of omnisharp-server
46
- (if using vim 8.0+, neovim or vim-dispatch). Symantic completions are triggered
48
+ (if using vim 8.0+, neovim or vim-dispatch). Semantic completions are triggered
47
49
using omni-completion (CTRL-X_CTRL-O in insert mode), or using an
48
50
autocompletion plugin such as asyncomplete or Deoplete.
49
51
@@ -375,8 +377,8 @@ Default: atcursor >
375
377
376
378
*g:OmniSharp_runtests_echo_output*
377
379
When running unit tests with |:OmniSharpRunTest| and |:OmniSharpRunTestsInFile|
378
- or from the test runner , echo all test runner output to the |message-history|,
379
- so it can be viewed with |:messages|.
380
+ or from the |omnisharp-testrunner| , echo all test runner output to the
381
+ |message-history|, so it can be viewed with |:messages|.
380
382
Default: 0
381
383
382
384
*g:OmniSharp_runtests_parallel*
@@ -404,6 +406,47 @@ Default: 0
404
406
Open the |omnisharp-testrunner| automatically when running tests.
405
407
Default: 1
406
408
409
+ *g:OmniSharp_testrunner_banner*
410
+ Display the |omnisharp-testrunner| help/introduction banner when opening the
411
+ testrunner. When this option is set to 0, the banner may still be toggled with
412
+ the <F1> (default) toggle mapping.
413
+ Default: 1
414
+
415
+ *g:OmniSharp_testrunner_glyph*
416
+ Display a passed/failed "glyph" string beside completed test results in the
417
+ |omnisharp-testrunner|.
418
+ Default: 1
419
+
420
+ *g:OmniSharp_testrunner_glyph_failed*
421
+ The "glyph" string to display beside failed completed tests in the testrunner.
422
+ Default: ✘
423
+
424
+ *g:OmniSharp_testrunner_glyph_passed*
425
+ The "glyph" string to display beside passed completed tests in the testrunner.
426
+ Default: ✔
427
+
428
+ *g:OmniSharp_testrunner_loglevel*
429
+ The type of build and test logs to output in the |omnisharp-testrunner|.
430
+
431
+ all All build output and test runner output is displayed.
432
+
433
+ error When a build error occurs, the error message and stack
434
+ trace are output.
435
+
436
+ none Only build error messages will be output.
437
+
438
+ Default: error >
439
+ let g:OmniSharp_testrunner_loglevel = 'all'
440
+ <
441
+ *g:OmniSharp_testrunner_spinner*
442
+ Display a "running" spinner animation when running tests in the testrunner.
443
+ Default: 1
444
+
445
+ *g:OmniSharp_testrunner_spinnersteps*
446
+ A list of "step" strings to be displayed as the |omnisharp-testrunner|
447
+ "spinner" animation.
448
+ Default: ['∙∙∙', '●∙∙', '∙●∙', '∙∙●', '∙∙∙']
449
+
407
450
-------------------------------------------------------------------------------
408
451
3.6 INTEGRATIONS *omnisharp-integration-options*
409
452
@@ -610,18 +653,21 @@ convenient user re-mapping. These can be used like so: >
610
653
*<Plug>(omnisharp_run_test_no_build)*
611
654
:OmniSharpRunTest[!]
612
655
Run the current unit test. The cursor can be anywhere in the test method.
656
+ The |omnisharp-testrunner| window will be opened to display the test
657
+ status and results.
613
658
If the test fails, the failure message and location will be displayed in
614
- the quickfix list, along with the error stack trace, if one exists.
659
+ the testrunner, or optionally (see |g:OmniSharp_runtests_quickfix|) in the
660
+ quickfix list, along with the error stack trace if one exists.
615
661
616
662
When called with ! or the |<Plug>(omnisharp_run_test_no_build)| mapping, the
617
663
project is not built before running the test.
618
664
619
- *:OmniSharpDebugTest*
620
- *<Plug>(omnisharp_debug_test)*
621
- *<Plug>(omnisharp_debug_test_no_build)*
665
+ *:OmniSharpDebugTest*
666
+ *<Plug>(omnisharp_debug_test)*
667
+ *<Plug>(omnisharp_debug_test_no_build)*
622
668
:OmniSharpDebugTest[!]
623
669
Debug the current unit test with Vimspector. The cursor can be anywhere in
624
- the test method. The quickfix list is not populated with the test result.
670
+ the test method.
625
671
626
672
When called with ! or the |<Plug>(omnisharp_debug_test_no_build)| mapping,
627
673
the project is not built before starting the debugger.
@@ -630,8 +676,9 @@ convenient user re-mapping. These can be used like so: >
630
676
*<Plug>(omnisharp_run_tests_in_file)*
631
677
*<Plug>(omnisharp_run_tests_in_file_no_build)*
632
678
:OmniSharpRunTestsInFile[!]
633
- Run all unit tests in the current file. The quickfix list will be
634
- populated with the test results of all tests.
679
+ Run all unit tests in the current file. When |g:OmniSharp_runtests_quickfix|
680
+ is enabled, the quickfix list will be populated with the results of all
681
+ tests.
635
682
Optionally accepts one or more filenames of files to run tests for.
636
683
>
637
684
" Run all unit tests in the current file
@@ -655,6 +702,9 @@ convenient user re-mapping. These can be used like so: >
655
702
:OmniSharpOpenLog vsplit
656
703
:OmniSharpOpenLog tabedit
657
704
<
705
+ *:OmniSharpOpenTestRunner*
706
+ Open the |omnisharp-testrunner| window
707
+
658
708
*:OmniSharpGetCodeActions*
659
709
*<Plug>(omnisharp_code_actions)*
660
710
:OmniSharpGetCodeActions
@@ -796,7 +846,73 @@ OmniSharpStopped
796
846
Fired when the server process is stopped.
797
847
798
848
===============================================================================
799
- 6. INTEGRATIONS *omnisharp-integrations*
849
+ 6. TEST RUNNER *omnisharp-testrunner*
850
+
851
+ The test runner provides an overview of unit tests which have been run, along
852
+ with the test status (running/passed/failed/not run) and any outputs that may
853
+ be produced (exceptions and Console output).
854
+
855
+ Open the test runner window by either running a test (with e.g.
856
+ |:OmniSharpRunTest|) or with the |:OmniSharpOpenTestRunner| command.
857
+
858
+ Any time a new test is run, it (along with all other tests in the same file)
859
+ is added to the runner. Tests remain visible in the test runner window until
860
+ they are manually removed.
861
+
862
+ Tests are grouped under the files they are contained in, which are in turn
863
+ grouped by project. Folds are used to collapse and expand sections, so a
864
+ project/file/output section can be hidden or displayed using standard vim
865
+ |folding-commands|.
866
+
867
+ To disable the testrunner and instead use the quickfix list to navigate and
868
+ display test results, use the following settings: >
869
+ let g:OmniSharp_testrunner = 0
870
+ let g:OmniSharp_runtests_quickfix = 1
871
+ <
872
+ -------------------------------------------------------------------------------
873
+ 6.1 MAPPINGS *omnisharp-testrunner-mappings*
874
+
875
+ The following |<Plug>| mappings and associated default recursive mappings are
876
+ provided in the test runner window.
877
+
878
+ *<Plug>(omnisharp_testrunner_navigate)*
879
+ Default: <CR>
880
+ Navigate to the test under the cursor. When the used on a error stack trace
881
+ location in a failed test result, navigate to the stack location.
882
+
883
+ *<Plug>(omnisharp_testrunner_togglebanner)*
884
+ Default: <F1>
885
+ Toggle display of the help/intro banner. Note that the banner can be hidden
886
+ initially using the |g:OmniSharp_testrunner_banner| setting.
887
+
888
+ *<Plug>(omnisharp_testrunner_run)*
889
+ Default: <F5>
890
+ Run the test(s) under the cursor. When the cursor is on a line representing a
891
+ single test (the test itself or part of its output) then just that single test
892
+ is run. When the cursor is on a file name, then all tests in the file are run.
893
+ When the cursor is on a project name, all previously run tests in the project
894
+ will be run.
895
+ Note: Running tests in a project only runs previous run tests. This command
896
+ does not automatically discover tests in the project.
897
+
898
+ *<Plug>(omnisharp_testrunner_debug)*
899
+ Default: <F6>
900
+ Debug the test under the cursor in Vimspector.
901
+
902
+ *<Plug>(omnisharp_testrunner_set_breakpoints)*
903
+ Default: <F9>
904
+ When used on a failed test resulting in an error stack, the stack trace
905
+ locations are set in Vimspector as breakpoints.
906
+
907
+ *<Plug>(omnisharp_testrunner_remove)*
908
+ Default: dd
909
+ Remove the item under the cursor from the test runner. Can be used at the
910
+ test, file or project level. Note however that individual tests cannot be
911
+ completely removed: subsequent runs of tests in the containing file/project
912
+ will still run the removed test.
913
+
914
+ ===============================================================================
915
+ 7. INTEGRATIONS *omnisharp-integrations*
800
916
801
917
6.1 fzf, vim-clap, CtrlP, unite.vim~
802
918
0 commit comments