mirror of
https://github.com/starship/starship.git
synced 2025-06-26 12:51:34 +02:00
fix: Fix directory_in_root integration test on Windows (#181)
This commit is contained in:
parent
85ac0a6801
commit
5af70b9699
@ -70,6 +70,7 @@ fn root_directory() -> io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
fn directory_in_root() -> io::Result<()> {
|
fn directory_in_root() -> io::Result<()> {
|
||||||
let output = common::render_module("directory")
|
let output = common::render_module("directory")
|
||||||
.arg("--path=/etc")
|
.arg("--path=/etc")
|
||||||
@ -81,6 +82,17 @@ fn directory_in_root() -> io::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[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]
|
#[test]
|
||||||
#[ignore]
|
#[ignore]
|
||||||
fn truncated_directory_in_root() -> io::Result<()> {
|
fn truncated_directory_in_root() -> io::Result<()> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user