소스 검색

minor: test harness: Convert some global failure modes to TAP "Bail out" mode.

pull/232/head
Daniel Shahaf 9 년 전
부모
커밋
663c760cc9
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. +6
    -6
      tests/test-highlighting.zsh

+ 6
- 6
tests/test-highlighting.zsh 파일 보기

@ -31,20 +31,20 @@
# Check an highlighter was given as argument.
[[ -n "$1" ]] || {
echo "You must provide the name of a valid highlighter as argument." >&2
exit 1
echo >&2 "Bail out! You must provide the name of a valid highlighter as argument."
exit 2
}
# Check the highlighter is valid.
[[ -f ${0:h:h}/highlighters/$1/$1-highlighter.zsh ]] || {
echo "Could not find highlighter '$1'." >&2
exit 1
echo >&2 "Bail out! Could not find highlighter '$1'."
exit 2
}
# Check the highlighter has test data.
[[ -d ${0:h:h}/highlighters/$1/test-data ]] || {
echo "Highlighter '$1' has no test data." >&2
exit 1
echo >&2 "Bail out! Highlighter '$1' has no test data."
exit 2
}
# Load the main script.

불러오는 중...
취소
저장