Skip to content

Commit 7d5ae1c

Browse files
committed
Merge pull request #8 from tyru/add-test-scripts
add test/run.bat, test/run.sh
2 parents bb7ddcd + dbff569 commit 7d5ae1c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

test/run.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
vim -u NONE -N --cmd "let &rtp .= ',' . getcwd()" -S test/run.vim

test/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
vim -u NONE -N --cmd "let &rtp .= ',' . getcwd()" -S test/run.vim

test/run.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ function! s:run()
1919
call writefile([v:exception], outfile)
2020
endtry
2121
if system(printf('diff %s %s', shellescape(okfile), shellescape(outfile))) == ""
22-
echo printf('%s => ok', fnamemodify(vimfile, ':t'))
22+
let line = printf('%s => ok', fnamemodify(vimfile, ':t'))
2323
else
24-
echoerr printf('%s => ng', fnamemodify(vimfile, ':t'))
24+
let line = printf('%s => ng', fnamemodify(vimfile, ':t'))
2525
endif
26+
call append(line('$'), line)
2627
endfor
28+
syntax enable
29+
match Error /^.* => ng$/
2730
endfunction
2831

2932
call s:run()

0 commit comments

Comments
 (0)