@@ -131,18 +131,19 @@ function! s:run.single.test(testName, bufferTests) abort
131
131
let currentTest = currentTest[0 ]
132
132
let project = OmniSharp#GetHost (bufnr ).project
133
133
let targetFramework = project.MsBuildProject.TargetFramework
134
+ let currentTestName = substitute (currentTest.name, ' (.*)$' , ' ' , ' ' )
134
135
let opts = {
135
136
\ ' ResponseHandler' : funcref (' s:run.process' , [s: run .single.complete , bufnr , tests]),
136
137
\ ' BufNum' : bufnr ,
137
138
\ ' Parameters' : {
138
- \ ' MethodName' : substitute (currentTest.name, ' (.*)$ ' , ' ' , ' ' ) ,
139
+ \ ' MethodName' : currentTestName ,
139
140
\ ' NoBuild' : get (s: , ' nobuild' , 0 ),
140
141
\ ' TestFrameworkName' : currentTest.framework,
141
142
\ ' TargetFrameworkVersion' : targetFramework
142
143
\ },
143
144
\ ' SendBuffer' : 0
144
145
\}
145
- echomsg ' Running test ' . currentTest.name
146
+ echomsg ' Running test ' . currentTestName
146
147
call OmniSharp#stdio#Request (' /v2/runtest' , opts)
147
148
endfunction
148
149
@@ -243,7 +244,7 @@ function! s:run.multiple.inBuffer(bufnr, tests, Callback) abort
243
244
\ ' ResponseHandler' : funcref (' s:run.process' , [a: Callback , a: bufnr , a: tests ]),
244
245
\ ' BufNum' : a: bufnr ,
245
246
\ ' Parameters' : {
246
- \ ' MethodNames' : map (copy (a: tests ), {i ,t - > t .name}),
247
+ \ ' MethodNames' : map (copy (a: tests ), {i ,t - > substitute ( t .name, ' (.*)$ ' , ' ' , ' ' ) }),
247
248
\ ' NoBuild' : get (s: , ' nobuild' , 0 ),
248
249
\ ' TestFrameworkName' : a: tests [0 ].framework,
249
250
\ ' TargetFrameworkVersion' : targetFramework
@@ -427,7 +428,6 @@ function! s:utils.extractTests(bufnr, codeElements) abort
427
428
let testStart = min (filter (copy (testlines), {_,l - > l >= testStart}))
428
429
for dt in OmniSharp#GetHost (a: bufnr ).project.tests
429
430
if dt.CodeFilePath == # filename && dt.LineNumber == testStart
430
- " \ 'name': element.Properties.testMethodName,
431
431
call add (tests, {
432
432
\ ' name' : dt.FullyQualifiedName,
433
433
\ ' framework' : element.Properties.testFramework,
0 commit comments