mirror of
https://github.com/uutils/coreutils
synced 2025-01-18 16:14:13 +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");
|
.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]
|
#[test]
|
||||||
fn test_ls_order_size() {
|
fn test_ls_order_size() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
|
|
Loading…
Reference in a new issue