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-
31let s: vimlparser = vimlparser#import ()
42
53let s: sdir = expand (' <sfile>:p:h' )
64
75function ! s: run ()
6+ enew
7+ set buftype = nofile
88 let ng = 0
99 for vimfile in glob (s: sdir . ' /test*.vim' , 0 , 1 )
1010 let okfile = fnamemodify (vimfile, ' :r' ) . ' .ok'
@@ -25,7 +25,8 @@ function! s:run()
2525 catch
2626 call writefile ([v: exception ], outfile)
2727 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 )
2930 let line = printf (' %s => ok' , fnamemodify (vimfile, ' :.' ))
3031 call append (line (' $' ), line )
3132 else
@@ -34,7 +35,7 @@ function! s:run()
3435 endif
3536 let line = printf (' %s => ' . (skip ? ' skip' : ' ng' ), fnamemodify (vimfile, ' :.' ))
3637 call append (line (' $' ), line )
37- for line in readfile (outfile )
38+ for line in split ( diff , ' \n ' )
3839 call append (line (' $' ), ' ' . line )
3940 endfor
4041 endif
You can’t perform that action at this time.
0 commit comments