From 27881aafb2d254098c3fbfb0666e8807c55e3ef8 Mon Sep 17 00:00:00 2001 From: Adam Saponara Date: Sat, 20 May 2023 17:03:18 -0400 Subject: [PATCH] fix test compat in busybox --- tests/func/test_browse.sh | 6 +++++- tests/func/test_indent_outdent.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/func/test_browse.sh b/tests/func/test_browse.sh index 3c74cce..3dd1699 100755 --- a/tests/func/test_browse.sh +++ b/tests/func/test_browse.sh @@ -1,10 +1,14 @@ #!/usr/bin/env bash +# skip if tree is not available if ! command -v tree &>/dev/null; then - # skip if tree is not available skip='tree not in PATH' source 'test.sh' exit 0 +elif ! tree --help | grep -q charset; then + skip='tree version looks incorrect' + source 'test.sh' + exit 0 fi # make tmpdir and delete at exit diff --git a/tests/func/test_indent_outdent.sh b/tests/func/test_indent_outdent.sh index 88840cc..03d97be 100755 --- a/tests/func/test_indent_outdent.sh +++ b/tests/func/test_indent_outdent.sh @@ -30,7 +30,7 @@ source 'test.sh' macro='M-o a 0 enter f o r space { enter i = 1 enter } enter' extra_opts=(-i 1) declare -A expected -expected[auto_indent_1]='^for {$' +expected[auto_indent_1]='^for \{$' expected[auto_indent_2]='^'$'\t''i=1$' expected[auto_indent_3]='^}$' source 'test.sh'