Skip to content

Commit 5b277db

Browse files
committed
Run indentation tests in Vim's silent Ex-improved mode
Avoids screen flickering during test execution.
1 parent 13ca6fe commit 5b277db

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

dev/do/test-indent

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Run Clojure.vim indentation tests
3+
# Run Clojure.vim indentation tests.
44

55
# TODO: colour messages?
66

@@ -11,11 +11,8 @@ if [ "$EDITOR" != 'vim' ] && [ "$EDITOR" != 'nvim' ]; then
1111
exit 1
1212
fi
1313

14-
if [ "$EDITOR" = 'vim' ]; then
15-
editor_opts=('--not-a-term')
16-
else
17-
editor_opts=()
18-
fi
14+
extra_opts=()
15+
[ "$EDITOR" = 'vim' ] && extra_opts+=('--not-a-term')
1916

2017
PASSED=()
2118
FAILED=()
@@ -59,7 +56,7 @@ run_test_case() {
5956
test_cmd=('+normal! gg=G')
6057
fi
6158

62-
"$EDITOR" "${editor_opts[@]}" --clean -NXnu test-vimrc.vim "${test_cmd[@]}" '+xall!' -- "$actual_file"
59+
"$EDITOR" "${extra_opts[@]}" --clean -EsNXnu test-vimrc.vim "${test_cmd[@]}" '+xall!' -- "$actual_file"
6360

6461
diff --color=always -u "$expected_file" "$actual_file"
6562

dev/do/time-indent

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ profile start $(echo "${PREFIX}-$(date +%s.%N).log")
2626
profile! file $(dirname "$0")/../../indent/clojure.vim
2727
"
2828

29-
exec vim --clean -NXnu <(echo "$VIMRC") '+normal! gg=G' '+quitall!' "$1"
29+
exec vim --clean -ENXnu <(echo "$VIMRC") '+normal! gg=G' '+quitall!' "$1"

0 commit comments

Comments
 (0)