1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-15 01:31:08 +00:00
uutils-coreutils/tests
Jeffrey Finkelstein 63b496eaa8 truncate: refactor parse_size() function
Change the interface provided by the `parse_size()` function to reduce
its responsibilities to just a single task: parsing a number of bytes
from a string of the form '123KB', etc. Previously, the function was
also responsible for deciding which mode truncate would operate in.

Furthermore, this commit simplifies the code for parsing the number and
unit to be less verbose and use less mutable state.

Finally, this commit adds some unit tests for the `parse_size()`
function.
2021-05-19 23:07:11 -04:00
..
by-util truncate: refactor parse_size() function 2021-05-19 23:07:11 -04:00
common Migrate mknod to clap, closes #2051 (#2056) 2021-05-05 22:59:40 +02:00
fixtures head: print headings when reading multiple files 2021-05-16 12:03:10 -04:00
tests.rs tests ~ use build.rs build list of test_UTIL module files 2020-06-02 12:17:30 -05:00