Observed
Three colour tests assert exact truecolor (Color::Rgb) output, but they get their colour capability from the environment of the process running the tests. When COLORTERM is unset (and no truecolor TERM_PROGRAM is detected) they quantize to the 256-colour palette and fail. This happens on macOS and Linux alike. They pass only when the shell exports COLORTERM=truecolor.
jcode-tui-style: palette::buffer_tests::configured_role_recolors_role_cells_and_named_colors_only
jcode-tui-style: palette::light_theme_interaction::configured_colors_survive_the_light_theme_pass
jcode-tui-workspace: workspace_map_widget::tests::render_workspace_map_colors_completed_tiles_green
Reproduction (master 4c4d965)
$ env -u COLORTERM -u TERM_PROGRAM cargo test -p jcode-tui-style -p jcode-tui-workspace --lib --no-fail-fast
test palette::buffer_tests::configured_role_recolors_role_cells_and_named_colors_only ... FAILED
test palette::light_theme_interaction::configured_colors_survive_the_light_theme_pass ... FAILED
test result: FAILED. 80 passed; 2 failed; 1 ignored
test workspace_map_widget::tests::render_workspace_map_colors_completed_tiles_green ... FAILED
test result: FAILED. 23 passed; 1 failed; 0 ignored
$ COLORTERM=truecolor cargo test -p jcode-tui-style -p jcode-tui-workspace --lib --no-fail-fast
test result: ok. 82 passed; 0 failed; 1 ignored
test result: ok. 24 passed; 0 failed; 0 ignored
Expected
The tests pin the capability they assert, as the jcode-tui palette topology tests already do with jcode_tui_style::color::pin_truecolor_for_tests(), so their result does not depend on the shell running them.
Observed
Three colour tests assert exact truecolor (
Color::Rgb) output, but they get their colour capability from the environment of the process running the tests. WhenCOLORTERMis unset (and no truecolorTERM_PROGRAMis detected) they quantize to the 256-colour palette and fail. This happens on macOS and Linux alike. They pass only when the shell exportsCOLORTERM=truecolor.jcode-tui-style:palette::buffer_tests::configured_role_recolors_role_cells_and_named_colors_onlyjcode-tui-style:palette::light_theme_interaction::configured_colors_survive_the_light_theme_passjcode-tui-workspace:workspace_map_widget::tests::render_workspace_map_colors_completed_tiles_greenReproduction (master 4c4d965)
Expected
The tests pin the capability they assert, as the
jcode-tuipalette topology tests already do withjcode_tui_style::color::pin_truecolor_for_tests(), so their result does not depend on the shell running them.