mirror of
https://github.com/sharkdp/bat
synced 2024-11-08 19:10:41 +00:00
revamped integration test, made CHANGELOG changes
This commit is contained in:
parent
bf78288e9e
commit
6c62ed5608
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user