diff options
author | Fabricio Dematte <fabriciodematte7p@gmail.com> | 2021-05-24 18:38:10 -0300 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2021-06-11 09:57:41 +0530 |
commit | bfc2bbdeae6007638611bd31e7cd91ce29d7d690 (patch) | |
tree | c639665de584e17961c2adffde992dda9e33b0f2 /tests | |
parent | e5a531778a77b32d48dce5ae8c61aebe01160a78 (diff) |
add custom config file test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/integration.rs b/tests/integration.rs index 0bf3b44..f71f2b0 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -551,3 +551,20 @@ fn test_upper_case_ext_icon_match() { .assert() .stdout(predicate::str::contains("\u{f410}")); } + +#[cfg(unix)] +#[test] +fn test_custom_config_file_parsing() { + let dir = tempdir(); + dir.child("config.yaml").write_str("layout: tree").unwrap(); + dir.child("folder").create_dir_all().unwrap(); + dir.child("folder/file").touch().unwrap(); + let custom_config = dir.path().join("config.yaml"); + + cmd() + .arg("--config-file") + .arg(custom_config) + .arg(dir.child("folder").path()) + .assert() + .stdout(predicate::str::is_match("folder\nāāā file").unwrap()); +} |