mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
ls: add test for color grid alignment
This commit is contained in:
parent
cfc11b47a5
commit
a0eb4a0283
1 changed files with 21 additions and 3 deletions
|
@ -775,6 +775,18 @@ fn test_ls_color() {
|
||||||
.arg("z")
|
.arg("z")
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("");
|
.stdout_only("");
|
||||||
|
|
||||||
|
// The colors must not mess up the grid layout
|
||||||
|
at.touch("b");
|
||||||
|
scene
|
||||||
|
.ucmd()
|
||||||
|
.arg("--color")
|
||||||
|
.arg("-w=15")
|
||||||
|
.succeeds()
|
||||||
|
.stdout_only(format!(
|
||||||
|
"{} test-color\nb {}\n",
|
||||||
|
a_with_colors, z_with_colors
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
@ -1741,8 +1753,14 @@ fn test_ls_sort_extension() {
|
||||||
];
|
];
|
||||||
|
|
||||||
let result = scene.ucmd().arg("-1aX").run();
|
let result = scene.ucmd().arg("-1aX").run();
|
||||||
assert_eq!(result.stdout_str().split('\n').collect::<Vec<_>>(), expected,);
|
assert_eq!(
|
||||||
|
result.stdout_str().split('\n').collect::<Vec<_>>(),
|
||||||
|
expected,
|
||||||
|
);
|
||||||
|
|
||||||
let result = scene.ucmd().arg("-1a").arg("--sort=extension").run();
|
let result = scene.ucmd().arg("-1a").arg("--sort=extension").run();
|
||||||
assert_eq!(result.stdout_str().split('\n').collect::<Vec<_>>(), expected,);
|
assert_eq!(
|
||||||
|
result.stdout_str().split('\n').collect::<Vec<_>>(),
|
||||||
|
expected,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue