mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
seq: Add difficult cases to test suite
This commit is contained in:
parent
f27f827751
commit
66733ca994
1 changed files with 27 additions and 0 deletions
|
@ -81,6 +81,33 @@ fn test_rejects_non_floats() {
|
||||||
.usage_error("invalid floating point argument: 'foo'");
|
.usage_error("invalid floating point argument: 'foo'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_accepts_option_argument_directly() {
|
||||||
|
new_ucmd!()
|
||||||
|
.arg("-s,")
|
||||||
|
.arg("2")
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("1,2\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_option_with_detected_negative_argument() {
|
||||||
|
new_ucmd!()
|
||||||
|
.arg("-s,")
|
||||||
|
.args(&["-1", "2"])
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("-1,0,1,2\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_negative_number_as_separator() {
|
||||||
|
new_ucmd!()
|
||||||
|
.arg("-s")
|
||||||
|
.args(&["-1", "2"])
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("1-12\n");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_float() {
|
fn test_invalid_float() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue