Skip to content

WIP: Test runner #789

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

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
caceb3e
Refactor test-running code for readability
nickspoons May 26, 2022
385d905
Namespace test functions in function dictionaries
nickspoons May 27, 2022
6765dfb
Refactor test extraction into initialisation
nickspoons May 29, 2022
28baa07
Add new test runner buffer
nickspoons Jun 2, 2022
52045dd
Add initial omnisharptest syntax file
nickspoons Jun 3, 2022
7163a76
Add testrunner Repaint function for updating state
nickspoons Jun 3, 2022
b5f9ea3
Update test state when starting/completing a test
nickspoons Jun 4, 2022
4824d72
Add spinner for running tests
nickspoons Jun 5, 2022
898805f
Add option to disable quickfix for test results
nickspoons Jun 5, 2022
ed6b53e
Update testrunner state when debugging test
nickspoons Jun 5, 2022
d3f7023
Display Console output and fold syntax regions
nickspoons Jun 10, 2022
fcf84aa
Display failure message and exception stack trace
nickspoons Jun 11, 2022
7278d0f
Add default utf-8 running spinner
nickspoons Jun 11, 2022
87a313f
Clean up output and conceal namespaces
nickspoons Jun 12, 2022
155973b
Extend testrunner quick-help banner
nickspoons Jun 13, 2022
6f69101
Add <F1> mapping and variable to toggle banner
nickspoons Jun 13, 2022
bcc481e
Handle server-side errors and failed builds
nickspoons Jun 14, 2022
a159fc3
Display diagnostic test output (build status)
nickspoons Jun 14, 2022
080aac5
Add option for when to display build output
nickspoons Jun 15, 2022
8fa7747
Improve highlighting of concealed elements
nickspoons Jun 16, 2022
aa23050
Navigate to test locations
nickspoons Jun 16, 2022
a219f66
Add <Plug> and default testrunner mappings
nickspoons Jun 16, 2022
036cb0d
Add space between projects to fix fold levels
nickspoons Jun 20, 2022
b4c0f8f
Run test/tests in file/tests in project
nickspoons Jun 23, 2022
ce2d58a
Add F9 mapping to set breakpoints on stacktrace
nickspoons Jun 25, 2022
5738052
Add single break-point when error is under cursor
nickspoons Jun 25, 2022
8423a03
Debug test from test runner
nickspoons Jun 26, 2022
22489de
Add mapping to remove test/file/proj from runner
nickspoons Jun 27, 2022
ff58130
Refactor test dict from job.tests to s:tests
nickspoons Jun 29, 2022
2719943
Add foldtext for testrunner folds
nickspoons Jul 3, 2022
dfc2385
Toggle banner without repainting buffer
nickspoons Jul 14, 2022
7af7211
Update test without repainting buffer
nickspoons Jul 15, 2022
4e4e9b2
Only repaint when initializing new tests
nickspoons Jul 15, 2022
cd1e439
Add success/failure glyph beside completed tests
nickspoons Jul 16, 2022
648aeb7
Set g:OmniSharp_runtests_echo_output default to 0
nickspoons Jul 19, 2022
667df18
Namespace test functions in function dictionaries
nickspoons Jul 19, 2022
e1529cd
Document g:OmniSharp_runtests_quickfix
nickspoons Jul 19, 2022
8edbae6
Add option not to automatically open testrunner
nickspoons Jul 19, 2022
b6f998c
Repaint project output/errors on UpdateState
nickspoons Jul 20, 2022
a466a5c
Center banner title
nickspoons Jul 28, 2022
b2c1852
Repaint correctly after hiding (removing) project
nickspoons Jul 28, 2022
9ea89f5
Allow selection of running test
nickspoons Aug 13, 2022
55f4b6a
Document the omnisharp-testrunner feature
nickspoons Aug 29, 2022
ce69c65
Strip method signature from NUnit test name
nickspoons Sep 21, 2022
58a9e6c
Add test Discover function
nickspoons Oct 4, 2022
f2194a9
"Discover" tests before calling test runners
nickspoons Oct 4, 2022
27be05c
Update state and repaint multiple NUnit sources
nickspoons Oct 4, 2022
6003fab
Correctly run multiple NUnit tests (RunInFile)
nickspoons Oct 29, 2022
5312edb
Exclude quickfix stack locations from runner
nickspoons Feb 27, 2023
a045286
Allow opening test runner while test is running
nickspoons Feb 27, 2023
3325317
Add :OmniSharpTestRunnerReset command
nickspoons Apr 24, 2023
16a58b6
Refactor documentation
nickspoons Apr 24, 2023
f05414b
Wrap popups at word boundaries by default
nickspoons Apr 24, 2023
fece208
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