mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
nl: defer showing "line number overflow" error
This commit is contained in:
parent
bc7877b58c
commit
95ccc54d05
2 changed files with 26 additions and 7 deletions
|
@ -539,6 +539,22 @@ fn test_line_number_overflow() {
|
|||
.stderr_is("nl: line number overflow\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_line_number_no_overflow() {
|
||||
new_ucmd!()
|
||||
.arg(format!("--starting-line-number={}", i64::MAX))
|
||||
.pipe_in("a\n\\:\\:\nb")
|
||||
.succeeds()
|
||||
.stdout_is(format!("{0}\ta\n\n{0}\tb\n", i64::MAX));
|
||||
|
||||
new_ucmd!()
|
||||
.arg(format!("--starting-line-number={}", i64::MIN))
|
||||
.arg("--line-increment=-1")
|
||||
.pipe_in("a\n\\:\\:\nb")
|
||||
.succeeds()
|
||||
.stdout_is(format!("{0}\ta\n\n{0}\tb\n", i64::MIN));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_section_delimiter() {
|
||||
for arg in ["-dabc", "--section-delimiter=abc"] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue