Skip to content

Commit

Permalink
tests/ls: Test overflowing --width sizes in both decimal and octal
Browse files Browse the repository at this point in the history
  • Loading branch information
Skryptonyte committed Jul 12, 2023
1 parent 4ff1236 commit 4764c8b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,23 @@ fn test_ls_width() {
.stdout_only("test-width-1 test-width-3\ntest-width-2 test-width-4\n");
}

for option in [
"-w 100000000000000",
"-w=100000000000000",
"--width=100000000000000",
"--width 100000000000000",
"-w 07777777777777777777",
"-w=07777777777777777777",
"--width=07777777777777777777",
"--width 07777777777777777777",
] {
scene
.ucmd()
.args(&option.split(' ').collect::<Vec<_>>())
.arg("-C")
.succeeds()
.stdout_only("test-width-1 test-width-2 test-width-3 test-width-4\n");
}
scene
.ucmd()
.arg("-w=bad")
Expand Down

0 comments on commit 4764c8b

Please sign in to comment.