mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
wc: Adjust expected report for directories for Windows
This commit is contained in:
parent
4943517327
commit
f50b004860
1 changed files with 10 additions and 4 deletions
|
@ -206,14 +206,20 @@ fn test_file_bytes_dictate_width() {
|
|||
#[test]
|
||||
fn test_read_from_directory_error() {
|
||||
#[cfg(not(windows))]
|
||||
const MSG: &str = ".: Is a directory";
|
||||
const STDERR: &str = ".: Is a directory";
|
||||
#[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!()
|
||||
.args(&["."])
|
||||
.fails()
|
||||
.stderr_contains(MSG)
|
||||
.stdout_is(" 0 0 0 .\n");
|
||||
.stderr_contains(STDERR)
|
||||
.stdout_is(STDOUT);
|
||||
}
|
||||
|
||||
/// Test that getting counts from nonexistent file is an error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue