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

ls: if acl are used, show the + in the perms (#5816)

* ls: if acl are used, show the + in the perms

Tested by tests/mkdir/p-acl.sh

* CICD.yml: fix small formatting issue

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
Sylvestre Ledru 2024-01-14 15:57:22 +01:00 committed by GitHub
parent dc41ed2aeb
commit e01d5f75f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 82 additions and 6 deletions

View file

@ -4293,3 +4293,39 @@ fn test_term_colorterm() {
"exe"
);
}
#[cfg(all(unix, not(target_os = "macos")))]
#[test]
fn test_acl_display() {
use std::process::Command;
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let path = "a42";
at.mkdir(path);
let path = at.plus_as_string(path);
// calling the command directly. xattr requires some dev packages to be installed
// and it adds a complex dependency just for a test
match Command::new("setfacl")
.args(["-d", "-m", "group::rwx", &path])
.status()
.map(|status| status.code())
{
Ok(Some(0)) => {}
Ok(_) => {
println!("test skipped: setfacl failed");
return;
}
Err(e) => {
println!("test skipped: setfacl failed with {}", e);
return;
}
}
scene
.ucmd()
.args(&["-lda", &path])
.succeeds()
.stdout_contains("+");
}