diff options
author | John Merchant <john.oliver.merchant@gmail.com> | 2019-08-19 01:55:45 +1000 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-08-18 11:55:45 -0400 |
commit | 5af70b96993d231c02b39a25d523dec2919c8e00 (patch) | |
tree | 282b98d0f1baeef4058265f85a47a318d6e97a41 | |
parent | 85ac0a6801c5fc184913e9868e5330fda23dc0c9 (diff) |
fix: Fix directory_in_root integration test on Windows (#181)
-rw-r--r-- | tests/testsuite/directory.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/testsuite/directory.rs b/tests/testsuite/directory.rs index 05ac33707..beaa33282 100644 --- a/tests/testsuite/directory.rs +++ b/tests/testsuite/directory.rs @@ -70,6 +70,7 @@ fn root_directory() -> io::Result<()> { } #[test] +#[cfg(not(target_os = "windows"))] fn directory_in_root() -> io::Result<()> { let output = common::render_module("directory") .arg("--path=/etc") @@ -82,6 +83,17 @@ fn directory_in_root() -> io::Result<()> { } #[test] +#[cfg(target_os = "windows")] +fn directory_in_root() -> io::Result<()> { + let output = common::render_module("dir").arg("--path=C:\\").output()?; + let actual = String::from_utf8(output.stdout).unwrap(); + + let expected = format!("in {} ", Color::Cyan.bold().paint("/c")); + assert_eq!(expected, actual); + Ok(()) +} + +#[test] #[ignore] fn truncated_directory_in_root() -> io::Result<()> { let dir = Path::new("/tmp/starship/thrusters/rocket"); |