diff options
author | Rayhan Faizel <rayhan.faizel@hotmail.com> | 2023-07-12 23:24:26 +0530 |
---|---|---|
committer | Rayhan Faizel <rayhan.faizel@hotmail.com> | 2023-07-12 23:24:26 +0530 |
commit | 9e2653423925623ab1405e6e39ca8aa6c7627e13 (patch) | |
tree | 92739b9ab5a29d7bbcfbc6edf0c1441820bef41e /tests/by-util/test_ls.rs | |
parent | 504b9e15a06ff13fb0fb3e40b4e227148e773eb9 (diff) |
tests/ls: Test overflowing decimal and octal values of --width
Diffstat (limited to 'tests/by-util/test_ls.rs')
-rw-r--r-- | tests/by-util/test_ls.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 2eef69121..15ded8e6b 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -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") |