mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Add a test like the one in the issue.
Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
This commit is contained in:
parent
8693eaa3b9
commit
0ef6732632
1 changed files with 24 additions and 0 deletions
|
@ -803,6 +803,30 @@ fn test_ls_commas() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ls_commas_trailing() {
|
||||||
|
let scene = TestScenario::new(util_name!());
|
||||||
|
let at = &scene.fixtures;
|
||||||
|
at.touch(&at.plus_as_string("test-commas-trailing-2"));
|
||||||
|
|
||||||
|
at.touch(&at.plus_as_string("test-commas-trailing-1"));
|
||||||
|
at.append(
|
||||||
|
"test-commas-trailing-1",
|
||||||
|
&(0..2000)
|
||||||
|
.map(|x| x.to_string())
|
||||||
|
.collect::<Vec<_>>()
|
||||||
|
.join("\n"),
|
||||||
|
);
|
||||||
|
|
||||||
|
scene
|
||||||
|
.ucmd()
|
||||||
|
.arg("-sm")
|
||||||
|
.arg("./test-commas-trailing-1")
|
||||||
|
.arg("./test-commas-trailing-2")
|
||||||
|
.succeeds()
|
||||||
|
.stdout_matches(&Regex::new(r"\S$").unwrap()); // matches if there is no whitespace at the end of stdout.
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_ls_long() {
|
fn test_ls_long() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue