Skip to content

Commit

Permalink
tests/ls: Test overflowing decimal and octal values of --width
Browse files Browse the repository at this point in the history
  • Loading branch information
Skryptonyte committed Jul 12, 2023
1 parent 504b9e1 commit 9e26534
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 9e26534

Please sign in to comment.