mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
tests/ls: Implement tests for sort by width option
This commit is contained in:
parent
3f33c5b816
commit
21f1a119c3
1 changed files with 22 additions and 0 deletions
|
@ -1564,6 +1564,28 @@ fn test_ls_sort_name() {
|
|||
.stdout_is(".a\n.b\na\nb\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_sort_width() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("aaaaa");
|
||||
at.touch("bbb");
|
||||
at.touch("cccc");
|
||||
at.touch("eee");
|
||||
at.touch("d");
|
||||
at.touch("fffff");
|
||||
at.touch("abc");
|
||||
at.touch("zz");
|
||||
at.touch("bcdef");
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--sort=width")
|
||||
.succeeds()
|
||||
.stdout_is("d\nzz\nabc\nbbb\neee\ncccc\naaaaa\nbcdef\nfffff\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_order_size() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
|
Loading…
Reference in a new issue