mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/ls: Test overflowing decimal and octal values of --width
This commit is contained in:
parent
504b9e15a0
commit
9e26534239
1 changed files with 17 additions and 0 deletions
|
@ -670,6 +670,23 @@ fn test_ls_width() {
|
||||||
.stdout_only("test-width-1 test-width-3\ntest-width-2 test-width-4\n");
|
.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
|
scene
|
||||||
.ucmd()
|
.ucmd()
|
||||||
.arg("-w=bad")
|
.arg("-w=bad")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue