1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

wc: Adjust expected report for directories for Windows

This commit is contained in:
Jan Verbeek 2021-08-25 17:54:55 +02:00 committed by Michael Debertol
parent 4943517327
commit f50b004860

View file

@ -206,14 +206,20 @@ fn test_file_bytes_dictate_width() {
#[test] #[test]
fn test_read_from_directory_error() { fn test_read_from_directory_error() {
#[cfg(not(windows))] #[cfg(not(windows))]
const MSG: &str = ".: Is a directory"; const STDERR: &str = ".: Is a directory";
#[cfg(windows)] #[cfg(windows)]
const MSG: &str = ".: Access is denied"; const STDERR: &str = ".: Access is denied";
#[cfg(not(windows))]
const STDOUT: &str = " 0 0 0 .\n";
#[cfg(windows)]
const STDOUT: &str = "";
new_ucmd!() new_ucmd!()
.args(&["."]) .args(&["."])
.fails() .fails()
.stderr_contains(MSG) .stderr_contains(STDERR)
.stdout_is(" 0 0 0 .\n"); .stdout_is(STDOUT);
} }
/// Test that getting counts from nonexistent file is an error. /// Test that getting counts from nonexistent file is an error.