-# Make sure each group is in the documentation file.
-_check_groups() {
- test -n "$GROUPNAME_DOC_FILE" || return 0
-
- local testname="$(echo "$0" | sed -e 's/^.*tests\///g')"
- declare -a missing=()
-
- for group in "$@"; do
- if ! grep -q "^${group}[[:space:]]" "$GROUPNAME_DOC_FILE"; then
- missing+=("\"${group}\"")
- fi
- done
- test "${#missing}" -eq 0 && return 0
-
- local suffix=
- test "${#missing}" -gt 1 && suffix="s"
- echo "$testname: group$suffix ${missing[@]} not mentioned in documentation." 1>&2
- return 1
-}
-