diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-10-21 13:57:41 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-10-21 16:13:57 +0100 |
commit | e71be1292b92b244d065873fae5a17d5e1f0a16c (patch) | |
tree | ce77fb2219c8a3fce9bda19a11068c53bd025d4b /tests/ls/w-option.sh | |
parent | 0e997681d4497fe9ba6db035909e413a5af050a9 (diff) | |
download | coreutils-e71be1292b92b244d065873fae5a17d5e1f0a16c.tar.xz |
ls: fix off by one error when determining max display columns
* src/ls.c (main): Account for the first column not including
a separator when calculating max_idx.
* tests/ls/w-option.sh: Add a test case.
* NEWS: Mention the bug fix.
Diffstat (limited to 'tests/ls/w-option.sh')
-rwxr-xr-x | tests/ls/w-option.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ls/w-option.sh b/tests/ls/w-option.sh index f49c02815..6361aaf59 100755 --- a/tests/ls/w-option.sh +++ b/tests/ls/w-option.sh @@ -41,4 +41,8 @@ compare exp out || fail=1 # Ensure that 0 line length doesn't cause division by zero TERM=xterm ls -w0 -x --color=always || fail=1 +# coreutils <= 8.24 could display 1 column too few +ls -w4 -x -T0 a b > out || fail=1 +compare exp out || fail=1 + Exit $fail |