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

nl: add test for "--number-separator"

and replace "match" with "if let"
This commit is contained in:
Daniel Hofstetter 2023-07-12 15:25:02 +02:00
parent 5d2a2954be
commit 20b1f11daa
2 changed files with 13 additions and 5 deletions

View file

@ -156,3 +156,14 @@ fn test_invalid_number_width() {
.stderr_contains("invalid value 'invalid'");
}
}
#[test]
fn test_number_separator() {
for arg in ["-s:-:", "--number-separator=:-:"] {
new_ucmd!()
.arg(arg)
.pipe_in("test")
.succeeds()
.stdout_is(" 1:-:test\n");
}
}