diff options
author | Dan Wendorf <github@danwendorf.com> | 2019-12-06 11:19:11 -0800 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-12-06 14:19:11 -0500 |
commit | dee25c7b35284a23cfc189fbfcf26f6db7f51af0 (patch) | |
tree | b65126cb760a42200b06ac672846aa9bfa08dac1 /tests | |
parent | 9f574eaabdf4bf0d021f3bf7bb89231420b73bf7 (diff) |
feat: Add prefix config to directory module (#642)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testsuite/directory.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testsuite/directory.rs b/tests/testsuite/directory.rs index 006764ae8..2ead974e5 100644 --- a/tests/testsuite/directory.rs +++ b/tests/testsuite/directory.rs @@ -96,6 +96,22 @@ fn root_directory() -> io::Result<()> { } #[test] +fn test_prefix() -> io::Result<()> { + let output = common::render_module("directory") + .arg("--path=/") + .use_config(toml::toml! { + [directory] + prefix = "sample " + }) + .output()?; + let actual = String::from_utf8(output.stdout).unwrap(); + + let expected = format!("sample {} ", Color::Cyan.bold().paint("/")); + assert_eq!(expected, actual); + Ok(()) +} + +#[test] #[cfg(not(target_os = "windows"))] fn directory_in_root() -> io::Result<()> { let output = common::render_module("directory") |