mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
pr: exit with code 1 if --column argument is zero (#11750)
This commit is contained in:
@@ -873,3 +873,19 @@ fn test_expand_tab_does_not_consume_next_argument() {
|
||||
new_ucmd!().args(&["-ea", test_file_path]).succeeds();
|
||||
new_ucmd!().args(&["-ea1", test_file_path]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_zero_columns() {
|
||||
new_ucmd!()
|
||||
.arg("--column=0")
|
||||
.fails_with_code(1)
|
||||
.stderr_contains("pr: invalid --column argument '0'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_zero_columns_shortcut() {
|
||||
new_ucmd!()
|
||||
.arg("-0")
|
||||
.fails_with_code(1)
|
||||
.stderr_contains("pr: invalid --column argument '0'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user