1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 19:56:17 +00:00

Merge pull request #2609 from jfinkels/seq-negative-zero-start

seq: print negative zero at start of integer sequence
This commit is contained in:
Sylvestre Ledru 2021-08-28 12:32:50 +02:00 committed by GitHub
commit 85c7178b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 75 additions and 15 deletions

View file

@ -140,3 +140,21 @@ fn test_seq_wrong_arg_floats() {
fn test_zero_step_floats() {
new_ucmd!().args(&["10.0", "0", "32"]).fails();
}
#[test]
fn test_preserve_negative_zero_start() {
new_ucmd!()
.args(&["-0", "1"])
.succeeds()
.stdout_is("-0\n1\n")
.no_stderr();
}
#[test]
fn test_drop_negative_zero_end() {
new_ucmd!()
.args(&["1", "-1", "-0"])
.succeeds()
.stdout_is("1\n0\n")
.no_stderr();
}