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

Merge pull request #2740 from jfinkels/seq-inf-width-spaces

seq: correct fixed-width spacing for inf sequences
This commit is contained in:
Sylvestre Ledru 2021-11-12 21:16:40 +01:00 committed by GitHub
commit 177374aa5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -524,6 +524,22 @@ fn test_inf() {
run(&["inf"], b"1\n2\n3\n");
}
#[test]
fn test_inf_width() {
run(
&["-w", "1.000", "inf", "inf"],
b"1.000\n inf\n inf\n inf\n",
);
}
#[test]
fn test_neg_inf_width() {
run(
&["-w", "1.000", "-inf", "-inf"],
b"1.000\n -inf\n -inf\n -inf\n",
);
}
#[test]
fn test_ignore_leading_whitespace() {
new_ucmd!()