-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ubaldot/fix_basic_tests
Fix basic tests
- Loading branch information
Showing
6 changed files
with
174 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
vim: | ||
- nightly | ||
- v9.0.0000 | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
steps: | ||
- name: Setup Python | ||
|
@@ -37,3 +37,41 @@ jobs: | |
$VIMPRG --version | ||
cd test | ||
source ./run_tests.sh 1 | ||
unit_test_windows: | ||
name: unit_test_windows | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
vim: | ||
- nightly | ||
- v9.0.0000 | ||
|
||
steps: | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install jupyter_console | ||
run: | | ||
pip install jupyter_console | ||
- name: Setup Vim | ||
uses: rhysd/action-setup-vim@v1 | ||
id: vim | ||
with: | ||
version: ${{ matrix.vim }} | ||
|
||
- name: Checkout vim-replica plugin code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Tests | ||
run: | | ||
systeminfo | ||
echo "Vim command setup." | ||
$Env:VIMPRG = "${{ steps.vim.outputs.executable }}" | ||
& $Env:VIMPRG --version | ||
cd test | ||
.\run_tests.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,52 @@ | ||
@echo off | ||
|
||
REM Script to run the unit-tests for the TERMDEBUG Vim plugin on MS-Windows | ||
REM Script to run the unit-tests for the REPLICA Vim plugin on MS-Windows | ||
|
||
SETLOCAL | ||
SET VIMPRG="vim.exe" | ||
SET VIM_CMD=%VIMPRG% -u NONE -U NONE -i NONE --noplugin -N --not-a-term | ||
REM Define the paths and files | ||
SET "VIMPRG=vim.exe" | ||
SET "VIMRC=vimrc_for_tests" | ||
SET "VIM_CMD=%VIMPRG% -u %VIMRC% -U NONE -i NONE -N --not-a-term" | ||
|
||
%VIM_CMD% -c "vim9cmd g:TestName='test_termdebug.vim'" -S runner.vim | ||
REM Create or overwrite the vimrc file with the initial setting | ||
echo set runtimepath+=.. > "%VIMRC%" | ||
echo filetype plugin on >> "%VIMRC%" | ||
|
||
echo TERMDEBUG unit test results | ||
REM Check if the vimrc file was created successfully | ||
if NOT EXIST "%VIMRC%" ( | ||
echo "ERROR: Failed to create %VIMRC%" | ||
exit /b 1 | ||
) | ||
|
||
REM Display the contents of VIMRC (for debugging purposes) | ||
type "%VIMRC%" | ||
|
||
REM Run Vim with the specified configuration and additional commands | ||
%VIM_CMD% -c "vim9cmd g:TestName='test_replica.vim'" -S "runner.vim" | ||
|
||
REM Check the exit code of Vim command | ||
if %ERRORLEVEL% EQU 0 ( | ||
echo Vim command executed successfully. | ||
) else ( | ||
echo ERROR: Vim command failed with exit code %ERRORLEVEL%. | ||
del %VIMRC% | ||
exit /b 1 | ||
) | ||
|
||
REM Check test results | ||
echo REPLICA unit test results | ||
type results.txt | ||
|
||
findstr /I FAIL results.txt > nul 2>&1 | ||
if %ERRORLEVEL% EQU 0 echo ERROR: Some test failed. | ||
if %ERRORLEVEL% NEQ 0 echo SUCCESS: All the tests passed. | ||
REM Check for FAIL in results.txt | ||
findstr /I "FAIL" results.txt > nul 2>&1 | ||
if %ERRORLEVEL% EQU 0 ( | ||
echo ERROR: Some test failed. | ||
del %VIMRC% | ||
exit /b 1 | ||
) else ( | ||
echo All tests passed. | ||
) | ||
|
||
REM Exit script with success | ||
del %VIMRC% | ||
exit /b 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.