mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 12:28:30 +00:00
revamped integration test, made CHANGELOG changes
This commit is contained in:
parent
bf78288e9e
commit
6c62ed5608
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Features
|
## 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
|
## Bugfixes
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ fn bat_raw_command_with_config() -> Command {
|
|||||||
cmd.env_remove("BAT_STYLE");
|
cmd.env_remove("BAT_STYLE");
|
||||||
cmd.env_remove("BAT_THEME");
|
cmd.env_remove("BAT_THEME");
|
||||||
cmd.env_remove("BAT_TABS");
|
cmd.env_remove("BAT_TABS");
|
||||||
|
cmd.env_remove("BAT_CONFIG_DIR");
|
||||||
cmd
|
cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -749,21 +750,15 @@ fn config_location_when_generating() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn config_location_from_bat_config_dir_variable() {
|
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()
|
bat_with_config()
|
||||||
.env("BAT_CONFIG_DIR", bat_conf_dir.to_str().unwrap())
|
.env("BAT_CONFIG_DIR", "conf/")
|
||||||
.arg("--generate-config-file")
|
.arg("--config-file")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
.stdout(
|
.stdout(
|
||||||
predicate::str::is_match("Success! Config file written to .*config\n")
|
predicate::str::is_match("conf/config\n")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Ensure generated config file exists.
|
|
||||||
assert!(bat_conf_dir.join("config").exists());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user