tests: Add ability to skip tests

This commit is contained in:
Matthew Martin
2017-11-06 07:08:53 -06:00
parent 4bd30737dc
commit f4d37b74cc
2 changed files with 5 additions and 1 deletions

View File

@@ -97,10 +97,12 @@ run_test_internal() {
echo "# ${1:t:r}"
# Load the data and prepare checking it.
local BUFFER CURSOR MARK PENDING PREBUFFER REGION_ACTIVE WIDGET
local BUFFER CURSOR MARK PENDING PREBUFFER REGION_ACTIVE WIDGET skip_test
local -a expected_region_highlight region_highlight
. "$srcdir"/"$1"
(( $#skip_test )) && { print -r -- "1..0 # SKIP $skip_test"; return; }
# Check the data declares $PREBUFFER or $BUFFER.
[[ -z $PREBUFFER && -z $BUFFER ]] && { echo >&2 "Bail out! Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank"; return 1; }
# Check the data declares $expected_region_highlight.