1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

Merge pull request #5609 from cakebaker/ls_ignore_value_of_posixly_correct

ls: ignore value of `POSIXLY_CORRECT`
This commit is contained in:
Sylvestre Ledru 2023-12-06 21:27:21 +01:00 committed by GitHub
commit 80b1ccd665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 23 deletions

View file

@ -3828,3 +3828,30 @@ fn test_ls_cf_output_should_be_delimited_by_tab() {
.succeeds()
.stdout_is("a2345/\tb/\n");
}
#[cfg(all(unix, feature = "dd"))]
#[test]
fn test_posixly_correct() {
let scene = TestScenario::new(util_name!());
scene
.ccmd("dd")
.arg("if=/dev/zero")
.arg("of=file")
.arg("bs=1024")
.arg("count=1")
.succeeds();
scene
.ucmd()
.arg("-s")
.succeeds()
.stdout_contains_line("total 4");
scene
.ucmd()
.arg("-s")
.env("POSIXLY_CORRECT", "some_value")
.succeeds()
.stdout_contains_line("total 8");
}