From 23f9cc7a4f03c32e51b561a5453363231f5ae9b2 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 6 Dec 2024 16:04:40 -0800 Subject: [PATCH] tests: fix test to show that `NO_COLOR=1` results in no color This reproduces the problem in reported in #5041. --- cli/tests/test_global_opts.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/tests/test_global_opts.rs b/cli/tests/test_global_opts.rs index 3f7b476ed..7a21412d5 100644 --- a/cli/tests/test_global_opts.rs +++ b/cli/tests/test_global_opts.rs @@ -437,11 +437,12 @@ fn test_color_config() { "###); // Test that NO_COLOR does NOT override the request for color in the config file - test_env.add_env_var("NO_COLOR", ""); + test_env.add_env_var("NO_COLOR", "1"); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); + // TODO: Should have color insta::assert_snapshot!(stdout, @r###" - @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - ◆ 0000000000000000000000000000000000000000 + @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ◆ 0000000000000000000000000000000000000000 "###); // Test that per-repo config overrides the user config.