1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Correctly parse numbers starting with 0 as octal

This commit is contained in:
Joerg Jaspert 2022-06-12 12:55:33 +02:00
parent c513692bae
commit fd1e0e6dd7
2 changed files with 21 additions and 11 deletions

View file

@ -650,13 +650,19 @@ fn test_ls_width() {
.stdout_only("test-width-1 test-width-2 test-width-3 test-width-4\n");
}
for option in ["-w 06", "-w=06", "--width=06", "--width 06", "--wid=06"] {
for option in [
"-w 062",
"-w=062",
"--width=062",
"--width 062",
"--wid=062",
] {
scene
.ucmd()
.args(&option.split(' ').collect::<Vec<_>>())
.arg("-C")
.fails()
.stderr_contains("invalid line width");
.succeeds()
.stdout_only("test-width-1 test-width-3\ntest-width-2 test-width-4\n");
}
scene