diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-02-13 13:49:51 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-13 13:49:51 +0100 |
| commit | 7d00e267b6bc2ecf40355a1fa3904d5aa792e5a4 (patch) | |
| tree | 1f7b6f585943056d7ba304232870d808bc864a5f | |
| parent | 92ee4fc43fd750246bbc1529082c0c0c8d9f233e (diff) | |
| download | vis-7d00e267b6bc2ecf40355a1fa3904d5aa792e5a4.tar.gz vis-7d00e267b6bc2ecf40355a1fa3904d5aa792e5a4.tar.xz | |
test/vim: skip tests if vim is not available
| -rwxr-xr-x | vim/test.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vim/test.sh b/vim/test.sh index 65ec533..8cf769e 100755 --- a/vim/test.sh +++ b/vim/test.sh @@ -3,8 +3,6 @@ [ -z "$VIS" ] && VIS="../../vis" [ -z "$VIM" ] && VIM="vim" -EDITORS="$VIM $VIS" - TESTS=$1 [ -z "$TESTS" ] && TESTS=$(find . -name '*.keys' | sed 's/\.keys$//g') @@ -14,7 +12,13 @@ TESTS_SKIP=0 export VIS_PATH=. -$VIM --version | head -1 +if type "$VIM" >/dev/null 2>&1; then + EDITORS="$VIM $VIS" + $VIM --version | head -1 +else + EDITORS="$VIS" +fi + $VIS -v for t in $TESTS; do |
