Skip to content

Commit

Permalink
tests/csplit: add directory input file test.
Browse files Browse the repository at this point in the history
  • Loading branch information
fuad1502 committed Dec 12, 2024
1 parent 51791e0 commit f98e6d3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/by-util/test_csplit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1436,3 +1436,14 @@ fn create_named_pipe_with_writer(path: &str, data: &str) -> std::process::Child
.spawn()
.unwrap()
}

#[test]
fn test_directory_input_file() {
let (at, mut ucmd) = at_and_ucmd!();
at.mkdir("test_directory");

ucmd.args(&["test_directory", "1"])
.fails()
.code_is(1)
.stderr_only("csplit: read error: Is a directory\n0\n");
}

0 comments on commit f98e6d3

Please sign in to comment.