Skip to content

Commit

Permalink
tests/ls: test for sort by width option
Browse files Browse the repository at this point in the history
  • Loading branch information
Skryptonyte committed Jun 6, 2023
1 parent 39867df commit a71dd96
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,25 @@ 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("d");
at.touch("zz");

scene
.ucmd()
.arg("--sort=width")
.succeeds()
.stdout_is("d\nzz\nbbb\ncccc\naaaaa\n");

}

#[test]
fn test_ls_order_size() {
let scene = TestScenario::new(util_name!());
Expand Down

0 comments on commit a71dd96

Please sign in to comment.