Skip to content

redo fix for test-lib.sh color support

Richard Hansen git 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/22 patches 3 repliesIn review
  2. v2 posting 1/22 patches 0 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

* Eliminate the case statement and assume the user passed a sane value for $1.
* Use the same test as the non-colorized version of say_color() when determining whether to suppress the output: assume that a message can only be suppresed if $1 is the empty string. This avoids the need to test whether the variable say_color_$1 is set.
* Rename say_color_sgr0 to say_color_reset.
* Add a new variable say_color_ (set to the empty string) as a way of documenting that $1 is expected to be the empty string for normal text.

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "test-lib.sh: do tests for color support after changing HOME"t/test-lib.sh+43 -470 replies
2/2test-lib.sh: fix color support when tput needs ~/.terminfot/test-lib.sh+28 -293 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] redo fix for test-lib.sh color support

Changes from v1:
* Eliminate the case statement and assume the user passed a sane value for $1.
* Use the same test as the non-colorized version of say_color() when determining whether to suppress the output: assume that a message can only be suppresed if $1 is the empty string. This avoids the need to test whether the variable say_color_$1 is set.
* Rename say_color_sgr0 to say_color_reset.
* Add a new variable say_color_ (set to the empty string) as a way of documenting that $1 is expected to be the empty string for normal text.

Richard Hansen (2):
Revert "test-lib.sh: do tests for color support after changing HOME" test-lib.sh: fix color support when tput needs ~/.terminfo

 t/test-lib.sh | 99 ++++++++++++++++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 52 deletions(-)
Signature · 1 line
2.4.3