Skip to content

Commit 450c195

Browse files
committed
Fix win
1 parent bfd5200 commit 450c195

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

autoload/javaunit.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function javaunit#TestMethod(args,...)
6262
\.' '
6363
\.cwords
6464
endif
65+
let cmd = javaunit#util#EscapeCMD(cmd)
6566
call unite#start([['output/shellcmd', cmd]], {'log': 1, 'wrap': 1})
6667
else
6768
if filereadable('pom.xml')

autoload/javaunit/util.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ function! javaunit#util#Psep() abort
3333
endfunction
3434

3535

36-
function JavaUnitEscapeCMD(cmd)
37-
let s:cmd = substitute(a:cmd,' ','\\ ','g')
36+
function! javaunit#util#EscapeCMD(cmd)
37+
let s:cmd = substitute(a:cmd,' ',':','g')
38+
if s:WINDOWS()
39+
let s:cmd = substitute(s:cmd,';','\\;','g')
40+
endif
3841
let s:cmd = substitute(s:cmd,'\','\\\','g')
39-
let s:cmd = substitute(s:cmd,';','\\;','g')
4042
let s:cmd = substitute(s:cmd, '\t', '\\t', 'g')
4143
return substitute(s:cmd,':','\\:','g')
4244
endfunction

0 commit comments

Comments
 (0)