2017-09-08 21:15:39 +00:00
|
|
|
@echo off
|
|
|
|
REM Run tests on Windows.
|
|
|
|
REM
|
|
|
|
REM To run these tests, you should set up your Windows machine with the same
|
|
|
|
REM paths that are used in AppVeyor.
|
|
|
|
|
|
|
|
set tests=test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*/*.vader
|
|
|
|
|
|
|
|
REM Use the first argument for selecting tests to run.
|
|
|
|
if not "%1"=="" set tests=%1
|
|
|
|
|
|
|
|
set VADER_OUTPUT_FILE=%~dp0\vader_output
|
2018-07-03 18:53:40 +00:00
|
|
|
REM Automatically re-run Windows tests, which can fail some times.
|
|
|
|
set tries=0
|
|
|
|
|
2018-10-22 13:58:11 +00:00
|
|
|
:RUN_TESTS
|
2018-07-03 18:53:40 +00:00
|
|
|
set /a tries=%tries%+1
|
2017-09-08 21:15:39 +00:00
|
|
|
type nul > "%VADER_OUTPUT_FILE%"
|
|
|
|
C:\vim\vim\vim80\vim.exe -u test/vimrc "+Vader! %tests%"
|
2018-07-03 18:53:40 +00:00
|
|
|
set code=%ERRORLEVEL%
|
|
|
|
|
|
|
|
IF %code% EQU 0 GOTO :SHOW_RESULTS
|
|
|
|
IF %tries% GEQ 2 GOTO :SHOW_RESULTS
|
|
|
|
GOTO :RUN_TESTS
|
|
|
|
|
2018-10-22 13:58:11 +00:00
|
|
|
:SHOW_RESULTS
|
2017-09-08 21:15:39 +00:00
|
|
|
type "%VADER_OUTPUT_FILE%"
|
|
|
|
del "%VADER_OUTPUT_FILE%"
|
2018-07-03 18:53:40 +00:00
|
|
|
|
|
|
|
exit /B %code%
|