test-lib-main.sh: use say_tap and say_color_tap for TAP output
commitb015d49fcc3292d90ef0cdf62113850516319454
authorKyle J. McKay <mackyle@gmail.com>
Fri, 30 Dec 2016 00:04:53 +0000 (29 16:04 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 30 Dec 2016 00:04:53 +0000 (29 16:04 -0800)
treef37bf7b6a69cf6a6067e85b69503e063f5fa97d6
parentc584725c1821a6e93dd038d1ea1e0d0b0baa6d2e
test-lib-main.sh: use say_tap and say_color_tap for TAP output

Introduce two new functions: say_tap and say_color_tap to output
any TAP-specific lines (other than comments) and alter the code
that output such TAP-specific lines to use them.

If a line is output with say_tap or say_color_tap AND the
"$HARNESS_ACTIVE" variable is non-empty then following new behavior
occurs:

  1) The line is output WITHOUT any color sequences no matter what
  2) The "--quiet" option is IGNORED and the line is always output

Additionally, for lines output using say_color the following new
behavior also occurs again ONLY when "$TEST_HARNESS" is active:

  3) If the first character of the output line is '#' then that
     character ONLY is guaranteed to be output WITHOUT color

These changes make the testing library more correct and easier
to use.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/test-lib-main.sh