vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 3b2e0e46039b5565348a78a483aa559b5dba11c0 parent 8ea87916332d8a0e0d0c3a73e01147476e43fdad Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 5 Nov 2016 14:25:35 +0100 test/sam: improve test output Redirect the vis UI to /dev/null. Let it write to an output file instead of redirecting stdout, keeps the terminal in a sane state. Diffstat:
| M | sam/test.sh | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sam/test.sh b/sam/test.sh @@ -54,8 +54,8 @@ for t in $TESTS; do printf "Running test %s with vis ... " "$t" - cat "$IN" | $VIS "+{ $NL $CMD $NL wq! $NL }" - > "$VIS_OUT" - if [ $? -ne 0 ]; then + $VIS "+{ $NL $CMD $NL wq! $VIS_OUT $NL }" "$IN" 2>/dev/null + if [ $? -ne 0 -o ! -e "$VIS_OUT" ]; then printf "ERROR\n" elif cmp -s "$REF" "$VIS_OUT"; then printf "OK\n"