Skip to content

Commit

Permalink
stat: Output error when - and -f are used together.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skryptonyte committed Aug 10, 2023
1 parent e3ea614 commit b0452cb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/by-util/test_stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,19 @@ fn test_stdin_pipe_fifo2() {
.succeeded();
}

#[test]
#[cfg(all(unix, not(target_os = "android")))]
fn test_stdin_with_fs_option() {
// $ stat -f -
new_ucmd!()
.arg("-f")
.arg("-")
.set_stdin(std::process::Stdio::null())
.fails()
.code_is(1)
.stderr_contains("using '-' to denote standard input does not work in file system mode");
}

#[test]
#[cfg(all(
unix,
Expand Down

0 comments on commit b0452cb

Please sign in to comment.