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:
parent
dc41ed2aeb
commit
e01d5f75f7
5 changed files with 82 additions and 6 deletions
|
@ -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("+");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue