mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
cut: two new tests; -d conflict & no arg
This commit is contained in:
parent
d11878403c
commit
1137d9a62d
1 changed files with 18 additions and 0 deletions
|
@ -117,6 +117,17 @@ fn test_whitespace_with_char() {
|
||||||
.code_is(1);
|
.code_is(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_delimiter_with_byte_and_char() {
|
||||||
|
for conflicting_arg in ["-c", "-b"] {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&[conflicting_arg, COMPLEX_SEQUENCE.sequence, "-d="])
|
||||||
|
.fails()
|
||||||
|
.stderr_is("cut: invalid input: The '--delimiter' ('-d') option only usable if printing a sequence of fields\n")
|
||||||
|
.code_is(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_too_large() {
|
fn test_too_large() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
|
@ -289,6 +300,13 @@ fn test_multiple_mode_args() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_no_argument() {
|
||||||
|
new_ucmd!().fails().stderr_is(
|
||||||
|
"cut: invalid usage: expects one of --fields (-f), --chars (-c) or --bytes (-b)\n",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn test_8bit_non_utf8_delimiter() {
|
fn test_8bit_non_utf8_delimiter() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue