on master help sign in
revamped integration test, made CHANGELOG changes
commit6c62ed5608b842e3052805ea1f13856b071f11b7 authorBill Risher <bill@billrisher.com> dateSat 14 Aug 2021, 14:42 (5 years ago) parentbf78288
2 files changed+5−10
CHANGELOG.md+1−1 tests/integration_tests.rs+4−9
CHANGELOG.md+1−1
@@ -2,7 +2,7 @@
22
33## Features
44
5−- $BAT_CONFIG_DIR is now a recognized environment variable and has precedent over $XDG_CONFIG_HOME. (@billrisher)
5+- `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME`, see #1727 (@billrisher)
66
77## Bugfixes
88
tests/integration_tests.rs+4−9
@@ -40,6 +40,7 @@ fn bat_raw_command_with_config() -> Command {
4040 cmd.env_remove("BAT_STYLE");
4141 cmd.env_remove("BAT_THEME");
4242 cmd.env_remove("BAT_TABS");
43+ cmd.env_remove("BAT_CONFIG_DIR");
4344 cmd
4445}
4546
@@ -749,21 +750,15 @@ fn config_location_when_generating() {
749750
750751#[test]
751752fn config_location_from_bat_config_dir_variable() {
752− let bat_conf_dir = tempdir().expect("can't create temporary directory.").path().join("bat_conf_dir/");
753−
754− // Create file at BAT_CONFIG_DIR
755753 bat_with_config()
756− .env("BAT_CONFIG_DIR", bat_conf_dir.to_str().unwrap())
757− .arg("--generate-config-file")
754+ .env("BAT_CONFIG_DIR", "conf/")
755+ .arg("--config-file")
758756 .assert()
759757 .success()
760758 .stdout(
761− predicate::str::is_match("Success! Config file written to .*config\n")
759+ predicate::str::is_match("conf/config\n")
762760 .unwrap()
763761 );
764−
765− // Ensure generated config file exists.
766− assert!(bat_conf_dir.join("config").exists());
767762}
768763
769764#[test]