mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
tests: fix test_ls_path for windows
This commit is contained in:
parent
31545258ac
commit
9f88963764
1 changed files with 10 additions and 2 deletions
|
@ -1992,10 +1992,18 @@ fn test_ls_path() {
|
||||||
.stdout_is(expected_stdout);
|
.stdout_is(expected_stdout);
|
||||||
|
|
||||||
let abs_path = format!("{}/{}", at.as_string(), path);
|
let abs_path = format!("{}/{}", at.as_string(), path);
|
||||||
let expected_stdout = &format!("{}\n", abs_path);
|
let expected_stdout = if cfg!(windows) {
|
||||||
|
format!("\'{}\'\n", abs_path)
|
||||||
|
} else {
|
||||||
|
format!("{}\n", abs_path)
|
||||||
|
};
|
||||||
scene.ucmd().arg(&abs_path).run().stdout_is(expected_stdout);
|
scene.ucmd().arg(&abs_path).run().stdout_is(expected_stdout);
|
||||||
|
|
||||||
let expected_stdout = &format!("{}\n{}\n", path, file1);
|
let expected_stdout = if cfg!(windows) {
|
||||||
|
format!("{} {}\n", path, file1)
|
||||||
|
} else {
|
||||||
|
format!("{}\n{}\n", path, file1)
|
||||||
|
};
|
||||||
scene
|
scene
|
||||||
.ucmd()
|
.ucmd()
|
||||||
.arg(file1)
|
.arg(file1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue