File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -468,10 +468,20 @@ function! rust#Test(all, options) abort
468
468
if manifest == # ' '
469
469
return rust#Run (1 , ' --test ' . a: options )
470
470
endif
471
- let manifest = shellescape (manifest)
471
+
472
+ if exists (' :terminal' )
473
+ let cmd = ' terminal '
474
+ else
475
+ let cmd = ' !'
476
+ let manifest = shellescape (manifest)
477
+ endif
472
478
473
479
if a: all
474
- execute ' !cargo test --manifest-path' manifest a: options
480
+ if a: options == # ' '
481
+ execute cmd . ' cargo test --manifest-path' manifest
482
+ else
483
+ execute cmd . ' cargo test --manifest-path' manifest a: options
484
+ endif
475
485
return
476
486
endif
477
487
@@ -484,7 +494,11 @@ function! rust#Test(all, options) abort
484
494
echohl None
485
495
return
486
496
endif
487
- execute ' !cargo test --manifest-path' manifest func_name a: options
497
+ if a: options == # ' '
498
+ execute cmd . ' cargo test --manifest-path' manifest func_name
499
+ else
500
+ execute cmd . ' cargo test --manifest-path' manifest func_name a: options
501
+ endif
488
502
return
489
503
finally
490
504
call setpos (' .' , saved)
You can’t perform that action at this time.
0 commit comments