From 79aee58a4621d01c4b1e98c332775f3b87213ddb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 Nov 2023 13:08:56 -0500 Subject: Treat NO_COLOR="" the same as unset The docs say > Command-line software which adds ANSI color to its output by default > should check for a NO_COLOR environment variable that, when present > and not an empty string (regardless of its value), prevents the > addition of ANSI color. but we were not checking for the empty string. Link: https://no-color.org/ Link: https://github.com/sharkdp/fd/pull/1421 --- tests/bfs/nocolor_env_empty.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/bfs/nocolor_env_empty.sh (limited to 'tests/bfs/nocolor_env_empty.sh') diff --git a/tests/bfs/nocolor_env_empty.sh b/tests/bfs/nocolor_env_empty.sh new file mode 100644 index 0000000..0ffc046 --- /dev/null +++ b/tests/bfs/nocolor_env_empty.sh @@ -0,0 +1,5 @@ +command -v unbuffer &>/dev/null || skip + +NO_COLOR= bfs_pty rainbow >"$OUT" +sort_output +diff_output -- cgit v1.2.3