From 7d00e267b6bc2ecf40355a1fa3904d5aa792e5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 13 Feb 2020 13:49:51 +0100 Subject: test/vim: skip tests if vim is not available --- vim/test.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vim') 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 -- cgit v1.2.3