coreutils/tests
Mahmoud Soltan 97a0c06ff4
Proper columns for ls -l (#2623)
* Used .as_path() and .as_str() when required:

when the argument required is a Path and not a PathBuf,
or an str and not a Path, respectively.

* Changed display_items to take Vec<PathData>, which is passed, instead of [PathData]

* Added a pad_right function.

* Implemented column-formating to mimic the behavior of GNU coreutils's ls

Added returns in display_dir_entry_size that keep track of uname and
group lengths.
Renamed variables to make more sense.
Changed display_item_long to take all the lengths it needs to render
correctly.
Implemented owner, group, and author padding right to mimic GNU ls.

* Added a todo for future quality-of-life cache addition.

* Documented display_item_long, as a first step in documenting all functions.

* Revert "Used .as_path() and .as_str() when required:"

This reverts commit b88db6a817.

* Revert "Changed display_items to take Vec<PathData>, which is passed, instead of [PathData]"

This reverts commit 0c690dda8d.

* Ran cargo fmt to get rid of Style/format `fmt` testing error.

* Added a test for `ls -l` and `ls -lan` line formats.

* Changed uname -> username for cspell. Removed extra blank line for rustfmt.
2021-08-30 23:09:16 +02:00
..
benches/factor refactor ~ cargo make format 2021-05-31 08:23:58 -05:00
by-util Proper columns for ls -l (#2623) 2021-08-30 23:09:16 +02:00
common pwd: Properly resolve logical working directory (#2604) 2021-08-28 22:31:20 +02:00
fixtures wc: Do a chunked read with proper UTF-8 handling 2021-08-26 01:38:16 +02:00
test_util_name.rs test_util_name: symlink the xecutable instead of copying 2021-08-20 00:20:56 +02:00
tests.rs tests ~ use build.rs build list of test_UTIL module files 2020-06-02 12:17:30 -05:00