1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

seq: Add difficult cases to test suite

This commit is contained in:
Andreas Molzer 2022-02-03 23:44:43 +01:00 committed by Roy Ivy III
parent f27f827751
commit 66733ca994

View file

@ -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!()