1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

ls: ignore invalid block size from env vars

This commit is contained in:
Daniel Hofstetter 2023-12-19 09:32:32 +01:00
parent 52af36d80b
commit a5606613bd
2 changed files with 16 additions and 3 deletions

View file

@ -3874,6 +3874,14 @@ fn test_ls_invalid_block_size() {
.stderr_is("ls: invalid --block-size argument 'invalid'\n");
}
// TODO ensure the correct block size is used when using -l because
// the output of "ls -l" and "BLOCK_SIZE=invalid ls -l" is different
#[test]
fn test_ls_invalid_block_size_in_env_var() {
new_ucmd!().env("LS_BLOCK_SIZE", "invalid").succeeds();
new_ucmd!().env("BLOCK_SIZE", "invalid").succeeds();
}
#[cfg(all(unix, feature = "dd"))]
#[test]
fn test_ls_block_size_override() {