revamped integration test, made CHANGELOG changes

This commit is contained in:
Bill Risher 2021-08-14 14:42:34 -05:00 committed by David Peter
parent bf78288e9e
commit 6c62ed5608
2 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -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]