From 1224403aa18e27dd3839cbc4211dcbdd53772ea5 Mon Sep 17 00:00:00 2001 From: Aaron Kollasch Date: Wed, 2 Nov 2022 17:09:15 -0400 Subject: [PATCH] Update comments in tests/integration_tests.rs --- tests/integration_tests.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index e1a97dc8..a1c79e02 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -892,7 +892,8 @@ fn config_read_arguments_from_file() { .stdout(predicate::eq("dummy-pager-from-config\n").normalize()); } -// ignore this test for now as bat cache --clear only targets the default projects dir +// Ignore this test for now as `bat cache --clear` only targets the default cache dir. +// `bat cache --clear` must clear the `--target` dir for this test to pass. #[cfg(unix)] #[test] #[ignore] @@ -912,6 +913,9 @@ fn cache_clear() { .count(); // Clear the targeted cache + // Include the BAT_CONFIG_PATH and BAT_THEME environment variables to ensure that + // options loaded from a config or the environment are not inserted + // before the cache subcommand, which would break it. bat_with_config() .current_dir(Path::new(EXAMPLES_DIR).join(src_dir)) .env("BAT_CONFIG_PATH", "bat.conf") @@ -950,6 +954,9 @@ fn cache_build() { let tmp_metadata_path = tmp_dir.path().join("metadata.yaml"); // Build the cache + // Include the BAT_CONFIG_PATH and BAT_THEME environment variables to ensure that + // options loaded from a config or the environment are not inserted + // before the cache subcommand, which would break it. bat_with_config() .current_dir(Path::new(EXAMPLES_DIR).join(src_dir)) .env("BAT_CONFIG_PATH", "bat.conf")