File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
-
2
-
3
1
let s: vimlparser = vimlparser#import ()
4
2
5
3
let s: sdir = expand (' <sfile>:p:h' )
6
4
7
5
function ! s: run ()
6
+ enew
7
+ set buftype = nofile
8
8
let ng = 0
9
9
for vimfile in glob (s: sdir . ' /test*.vim' , 0 , 1 )
10
10
let okfile = fnamemodify (vimfile, ' :r' ) . ' .ok'
@@ -25,7 +25,8 @@ function! s:run()
25
25
catch
26
26
call writefile ([v: exception ], outfile)
27
27
endtry
28
- if system (printf (' diff %s %s' , shellescape (okfile), shellescape (outfile))) == " "
28
+ let diff = system (printf (' diff -u %s %s' , shellescape (okfile), shellescape (outfile)))
29
+ if empty (diff )
29
30
let line = printf (' %s => ok' , fnamemodify (vimfile, ' :.' ))
30
31
call append (line (' $' ), line )
31
32
else
@@ -34,7 +35,7 @@ function! s:run()
34
35
endif
35
36
let line = printf (' %s => ' . (skip ? ' skip' : ' ng' ), fnamemodify (vimfile, ' :.' ))
36
37
call append (line (' $' ), line )
37
- for line in readfile (outfile )
38
+ for line in split ( diff , ' \n ' )
38
39
call append (line (' $' ), ' ' . line )
39
40
endfor
40
41
endif
You can’t perform that action at this time.
0 commit comments