Skip to content

Commit a0b6da2

Browse files
committed
Strip method signature from NUnit test name
1 parent 6fc5ed0 commit a0b6da2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

autoload/OmniSharp/actions/test.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,15 @@ function! s:run.process(Callback, bufnr, tests, response) abort
298298
\ 'locations': []
299299
\}
300300
for result in a:response.Body.Results
301+
" Strip method signature from test method fullname
302+
let fullname = substitute(result.MethodName, '(.*)$', '', '')
301303
" Strip namespace and classname from test method name
304+
let name = substitute(result.MethodName, '^.*\.', '', '')
302305
let location = {
303306
\ 'bufnr': a:bufnr,
304-
\ 'fullname': result.MethodName,
307+
\ 'fullname': fullname,
305308
\ 'filename': bufname(a:bufnr),
306-
\ 'name': substitute(result.MethodName, '^.*\.', '', '')
309+
\ 'name': name
307310
\}
308311
let locations = [location]
309312
" Write any standard output to message-history

autoload/OmniSharp/testrunner.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ function! OmniSharp#testrunner#StateComplete(location) abort
504504
else
505505
let state = 'Passed'
506506
endif
507-
call s:UpdateState(a:.location.bufnr, state, {
507+
call s:UpdateState(a:location.bufnr, state, {
508508
\ 'testnames': [a:location.fullname],
509509
\ 'message': get(a:location, 'message', []),
510510
\ 'stacktrace': get(a:location, 'stacktrace', []),

0 commit comments

Comments
 (0)