coreutils/tests
Jeffrey Finkelstein cfe5a0d82c split: correct filename creation algorithm
Fix two issues with the filename creation algorithm. First, this
corrects the behavior of the `-a` option. This commit ensures a
failure occurs when the number of chunks exceeds the number of
filenames representable with the specified fixed width:

    $ printf "%0.sa" {1..11} | split -d -b 1 -a 1
    split: output file suffixes exhausted

Second, this corrects the behavior of the default behavior when `-a`
is not specified on the command line. Previously, it was always
settings the filenames to have length 2 suffixes. This commit corrects
the behavior to follow the algorithm implied by GNU split, where the
filename lengths grow dynamically by two characters once the number of
chunks grows sufficiently large:

    $ printf "%0.sa" {1..91} | ./target/debug/coreutils split -d -b 1 \
    >   && ls x* | tail
    x81
    x82
    x83
    x84
    x85
    x86
    x87
    x88
    x89
    x9000
2022-01-10 20:43:22 -05:00
..
benches/factor refactor ~ cargo make format 2021-05-31 08:23:58 -05:00
by-util split: correct filename creation algorithm 2022-01-10 20:43:22 -05:00
common tests ~ fix cargo clippy complaint (clippy::needless_return) 2021-11-19 17:55:02 -06:00
fixtures split: correct filename creation algorithm 2022-01-10 20:43:22 -05:00
test_util_name.rs tests: silence clippy warnings for unused_imports 2021-10-10 00:52:18 +02:00
tests.rs tests ~ use build.rs build list of test_UTIL module files 2020-06-02 12:17:30 -05:00