Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Test runner #789

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4364a0b
Refactor test-running code for readability
nickspoons May 26, 2022
fa4a6c8
Namespace test functions in function dictionaries
nickspoons May 27, 2022
d768ddf
Refactor test extraction into initialisation
nickspoons May 29, 2022
42c9426
Add new test runner buffer
nickspoons Jun 2, 2022
b4bab8c
Add initial omnisharptest syntax file
nickspoons Jun 3, 2022
f1f0db9
Add testrunner Repaint function for updating state
nickspoons Jun 3, 2022
9acd572
Update test state when starting/completing a test
nickspoons Jun 4, 2022
0fba289
Add spinner for running tests
nickspoons Jun 5, 2022
3b2d256
Add option to disable quickfix for test results
nickspoons Jun 5, 2022
109d923
Update testrunner state when debugging test
nickspoons Jun 5, 2022
1b60e7f
Display Console output and fold syntax regions
nickspoons Jun 10, 2022
d5e247a
Display failure message and exception stack trace
nickspoons Jun 11, 2022
939147b
Add default utf-8 running spinner
nickspoons Jun 11, 2022
c4b0840
Clean up output and conceal namespaces
nickspoons Jun 12, 2022
2e3411a
Extend testrunner quick-help banner
nickspoons Jun 13, 2022
a831962
Add <F1> mapping and variable to toggle banner
nickspoons Jun 13, 2022
063b3b9
Handle server-side errors and failed builds
nickspoons Jun 14, 2022
f682f1e
Display diagnostic test output (build status)
nickspoons Jun 14, 2022
a3771d0
Add option for when to display build output
nickspoons Jun 15, 2022
ebbd022
Improve highlighting of concealed elements
nickspoons Jun 16, 2022
09e3f91
Navigate to test locations
nickspoons Jun 16, 2022
05a2fb5
Add <Plug> and default testrunner mappings
nickspoons Jun 16, 2022
2793374
Add space between projects to fix fold levels
nickspoons Jun 20, 2022
ca1da95
Run test/tests in file/tests in project
nickspoons Jun 23, 2022
7aafe93
Add F9 mapping to set breakpoints on stacktrace
nickspoons Jun 25, 2022
6450ab8
Add single break-point when error is under cursor
nickspoons Jun 25, 2022
4642e11
Debug test from test runner
nickspoons Jun 26, 2022
0f34524
Add mapping to remove test/file/proj from runner
nickspoons Jun 27, 2022
4d38a67
Refactor test dict from job.tests to s:tests
nickspoons Jun 29, 2022
7d3b690
Add foldtext for testrunner folds
nickspoons Jul 3, 2022
fe9bff8
Toggle banner without repainting buffer
nickspoons Jul 14, 2022
4719213
Update test without repainting buffer
nickspoons Jul 15, 2022
37967f6
Only repaint when initializing new tests
nickspoons Jul 15, 2022
7f561c7
Add success/failure glyph beside completed tests
nickspoons Jul 16, 2022
d95a041
Set g:OmniSharp_runtests_echo_output default to 0
nickspoons Jul 19, 2022
00f7b41
Namespace test functions in function dictionaries
nickspoons Jul 19, 2022
7a6b45a
Document g:OmniSharp_runtests_quickfix
nickspoons Jul 19, 2022
8cd8375
Add option not to automatically open testrunner
nickspoons Jul 19, 2022
e8221e3
Repaint project output/errors on UpdateState
nickspoons Jul 20, 2022
44c338e
Center banner title
nickspoons Jul 28, 2022
7df4b20
Repaint correctly after hiding (removing) project
nickspoons Jul 28, 2022
27dd928
Allow selection of running test
nickspoons Aug 13, 2022
a012145
Document the omnisharp-testrunner feature
nickspoons Aug 29, 2022
fc53ee2
Strip method signature from NUnit test name
nickspoons Sep 21, 2022
76d05a9
Add test Discover function
nickspoons Oct 4, 2022
9446021
"Discover" tests before calling test runners
nickspoons Oct 4, 2022
969c34a
Update state and repaint multiple NUnit sources
nickspoons Oct 4, 2022
034dea5
Correctly run multiple NUnit tests (RunInFile)
nickspoons Oct 29, 2022
4d2b315
Exclude quickfix stack locations from runner
nickspoons Feb 27, 2023
ce1c0f4
Allow opening test runner while test is running
nickspoons Feb 27, 2023
e97eab6
Add :OmniSharpTestRunnerReset command
nickspoons Apr 24, 2023
57f602a
Refactor documentation
nickspoons Apr 24, 2023
d5a1415
Wrap popups at word boundaries by default
nickspoons Apr 24, 2023
66a2d62
Fix incorrect help tag
nickspoons Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
597 changes: 342 additions & 255 deletions autoload/OmniSharp/actions/test.vim

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions autoload/OmniSharp/popup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ function! s:VimOpen(what, opts) abort
endif
" Prevent popup buffer from being listed in buffer list (`:ls`)
call setbufvar(winbufnr(winid), '&buflisted', 0)
" Make wrapping occur at word boundaries
call setwinvar(winid, '&linebreak', 1)
return winid
endfunction

Expand Down
6 changes: 3 additions & 3 deletions autoload/OmniSharp/preview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ function! OmniSharp#preview#Display(content, title) abort
silent wincmd P
setlocal modifiable noreadonly
setlocal nobuflisted buftype=nofile bufhidden=wipe
0,$d
0,$delete
silent put =a:content
0d_
setfiletype omnisharpdoc
0delete _
set filetype=omnisharpdoc
setlocal conceallevel=3
setlocal nomodifiable readonly
let winid = winnr()
Expand Down
3 changes: 2 additions & 1 deletion autoload/OmniSharp/stdio.vim
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ function! s:HandleServerEvent(job, res) abort

" Diagnostics received while running tests
if get(a:res, 'Event', '') ==# 'TestMessage'
let lines = split(body.Message, '\n')
let lines = split(body.Message, '\r\?\n')
call OmniSharp#testrunner#Log(lines)
for line in lines
if get(body, 'MessageLevel', '') ==# 'error'
echohl WarningMsg | echomsg line | echohl None
Expand Down
Loading
Loading