summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Risher <bill@billrisher.com>2021-08-14 14:42:34 -0500
committerDavid Peter <sharkdp@users.noreply.github.com>2021-08-14 22:02:58 +0200
commit6c62ed5608b842e3052805ea1f13856b071f11b7 (patch)
treecad912defe8928163d54d20012c2b5d89ad3b65b
parentbf78288e9ec28cfbec7610de19c20bbe04f33f98 (diff)
revamped integration test, made CHANGELOG changes
-rw-r--r--CHANGELOG.md2
-rw-r--r--tests/integration_tests.rs13
2 files changed, 5 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70ebcac6..707ea220 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## Features
-- $BAT_CONFIG_DIR is now a recognized environment variable and has precedent over $XDG_CONFIG_HOME. (@billrisher)
+- `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME`, see #1727 (@billrisher)
## Bugfixes
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 942894fd..7edb10b9 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -40,6 +40,7 @@ fn bat_raw_command_with_config() -> Command {
cmd.env_remove("BAT_STYLE");
cmd.env_remove("BAT_THEME");
cmd.env_remove("BAT_TABS");
+ cmd.env_remove("BAT_CONFIG_DIR");
cmd
}
@@ -749,21 +750,15 @@ fn config_location_when_generating() {
#[test]
fn config_location_from_bat_config_dir_variable() {
- let bat_conf_dir = tempdir().expect("can't create temporary directory.").path().join("bat_conf_dir/");
-
- // Create file at BAT_CONFIG_DIR
bat_with_config()
- .env("BAT_CONFIG_DIR", bat_conf_dir.to_str().unwrap())
- .arg("--generate-config-file")
+ .env("BAT_CONFIG_DIR", "conf/")
+ .arg("--config-file")
.assert()
.success()
.stdout(
- predicate::str::is_match("Success! Config file written to .*config\n")
+ predicate::str::is_match("conf/config\n")
.unwrap()
);
-
- // Ensure generated config file exists.
- assert!(bat_conf_dir.join("config").exists());
}
#[test]