summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoritchyny <itchyny@cybozu.co.jp>2023-08-05 19:18:07 +0900
committerNico Williams <nico@cryptonector.com>2023-08-05 23:21:12 -0500
commita6920601299913ec5f9c9a8883517ec10dd71ffe (patch)
treeabe1dbc2eb65473186a4962dd4ff156562c2a5e3 /tests
parentf94a9d463ffb3422861a0da140470dbf5ce76632 (diff)
Change the default color of null to Bright Black
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shtest18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/shtest b/tests/shtest
index ea6bc900..ee6cb36e 100755
--- a/tests/shtest
+++ b/tests/shtest
@@ -417,7 +417,7 @@ unset JQ_COLORS
## Default colors, null input
$JQ -Ccn . > $d/color
-printf '\033[1;30mnull\033[0m\n' > $d/expect
+printf '\033[0;90mnull\033[0m\n' > $d/expect
cmp $d/color $d/expect
## Set non-default color, null input
@@ -438,27 +438,27 @@ $JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
printf '[0m\033[1;37m\033[1;37'
printf 'm}\033[0m\033[1;37m,\033['
printf '0;37m123\033[0m\033[1;'
- printf '37m,\033[1;30mnull\033'
+ printf '37m,\033[0;90mnull\033'
printf '[0m\033[1;37m\033[1;37'
printf 'm]\033[0m\n'
} > $d/expect
cmp $d/color $d/expect
## Set non-default colors, complex input
-JQ_COLORS='1;30:0;31:0;32:0;33:0;34:1;35:1;36:1;30' \
+JQ_COLORS='0;30:0;31:0;32:0;33:0;34:1;35:1;36:1;37' \
$JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
{
printf '\033[1;35m[\033[1;36m{'
- printf '\033[0m\033[1;30m"a"\033['
+ printf '\033[0m\033[1;37m"a"\033['
printf '0m\033[1;36m:\033[0m\033['
printf '0;32mtrue\033[0m\033[1'
- printf ';36m,\033[0m\033[1;30m'
+ printf ';36m,\033[0m\033[1;37m'
printf '"b"\033[0m\033[1;36m:\033'
printf '[0m\033[0;31mfalse\033'
printf '[0m\033[1;36m\033[1;36'
printf 'm}\033[0m\033[1;35m,\033['
printf '0;33m123\033[0m\033[1;'
- printf '35m,\033[1;30mnull\033'
+ printf '35m,\033[0;30mnull\033'
printf '[0m\033[1;35m\033[1;35'
printf 'm]\033[0m\n'
} > $d/expect
@@ -503,16 +503,16 @@ if command -v script >/dev/null 2>&1; then
fi
faketty $JQ -n . > $d/color
- printf '\033[1;30mnull\033[0m\r\n' > $d/expect
+ printf '\033[0;90mnull\033[0m\r\n' > $d/expect
cmp $d/color $d/expect
NO_COLOR= faketty $JQ -n . > $d/color
- printf '\033[1;30mnull\033[0m\r\n' > $d/expect
+ printf '\033[0;90mnull\033[0m\r\n' > $d/expect
cmp $d/color $d/expect
NO_COLOR=1 faketty $JQ -n . > $d/color
printf 'null\r\n' > $d/expect
cmp $d/color $d/expect
NO_COLOR=1 faketty $JQ -Cn . > $d/color
- printf '\033[1;30mnull\033[0m\r\n' > $d/expect
+ printf '\033[0;90mnull\033[0m\r\n' > $d/expect
cmp $d/color $d/expect
fi