mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
nl: increase line number over multiple files
This commit is contained in:
parent
351722ebac
commit
1107fadca9
2 changed files with 37 additions and 9 deletions
|
@ -311,6 +311,19 @@ fn test_default_body_numbering() {
|
|||
.stdout_is(" 1\ta\n \n 2\tb\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_default_body_numbering_multiple_files() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
at.write("a.txt", "a");
|
||||
at.write("b.txt", "b");
|
||||
at.write("c.txt", "c");
|
||||
|
||||
ucmd.args(&["a.txt", "b.txt", "c.txt"])
|
||||
.succeeds()
|
||||
.stdout_is(" 1\ta\n 2\tb\n 3\tc\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_body_numbering_all_lines_without_delimiter() {
|
||||
for arg in ["-ba", "--body-numbering=a"] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue