diff options
author | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2023-12-01 16:27:05 +0100 |
---|---|---|
committer | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2023-12-03 16:01:19 +0100 |
commit | 51fc2d7564b29de22936e8ca4a73883aeca77662 (patch) | |
tree | 3e9a2f50cc13dd46808f295be9ac7b5ae490a554 /tests/by-util/test_ls.rs | |
parent | c77d389f5b93399bdeb6007f24d745c94e64f454 (diff) |
ls: ignore value of POSIXLY_CORRECT
Diffstat (limited to 'tests/by-util/test_ls.rs')
-rw-r--r-- | tests/by-util/test_ls.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 19a3f5578..fcd57170d 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -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"); +} |