vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit bf968a773577cfe43c4da2f6911c54fdc27a587f
parent 6a707cd21313a0ca493c6b9b60d7c96a4c8d905a
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sat, 19 Nov 2016 08:44:20 +0100

test/sam: try to fall back to `9 ssam` if ssam is not found

Diffstat:
Msam/test.sh | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/sam/test.sh b/sam/test.sh @@ -5,12 +5,18 @@ NL=' PLAN9="/usr/local/plan9/bin" [ -z "$VIS" ] && VIS="../../vis" -[ -z "$SSAM" ] && SSAM="$PLAN9/ssam" -type "$SSAM" >/dev/null 2>&1 || { - echo "ssam(1) not found, skipping tests" - exit 0 -} +if [ -z "$SSAM" ] || ! type "$SSAM" >/dev/null 2>&1; then + SSAM="$PLAN9/ssam" + if ! type "$SSAM" >/dev/null 2>&1; then + if type 9 >/dev/null 2>&1; then + SSAM="9 ssam" + else + echo "ssam(1) not found, skipping tests" + exit 0 + fi + fi +fi TESTS=$1 [ -z "$TESTS" ] && TESTS=$(find . -name '*.cmd' | sed 's/\.cmd$//g') @@ -18,6 +24,7 @@ TESTS=$1 TESTS_RUN=0 TESTS_OK=0 +echo "$SSAM" $VIS -v for t in $TESTS; do