mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
Add tests for multiple mode specifications
This commit is contained in:
parent
114be93e01
commit
63dbffa7f3
2 changed files with 18 additions and 0 deletions
|
|
@ -99,6 +99,8 @@ fn test_create_fifo_with_mode_and_umask() {
|
|||
test_fifo_creation("u-r,g-w,o+x", 0o022, "p-w-r--rwx"); // spell-checker:disable-line
|
||||
test_fifo_creation("a=rwx,o-w", 0o022, "prwxrwxr-x"); // spell-checker:disable-line
|
||||
test_fifo_creation("=rwx,o-w", 0o022, "prwxr-xr-x"); // spell-checker:disable-line
|
||||
test_fifo_creation("ug+rw,o+r", 0o022, "prw-rw-rw-"); // spell-checker:disable-line
|
||||
test_fifo_creation("u=rwx,g=rx,o=", 0o022, "prwxr-x---"); // spell-checker:disable-line
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -154,6 +154,22 @@ fn test_mknod_mode_permissions() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mknod_mode_comma_separated() {
|
||||
let ts = TestScenario::new(util_name!());
|
||||
ts.ucmd()
|
||||
.arg("-m")
|
||||
.arg("u=rwx,g=rx,o=")
|
||||
.arg("test_file")
|
||||
.arg("p")
|
||||
.succeeds();
|
||||
assert!(ts.fixtures.is_fifo("test_file"));
|
||||
assert_eq!(
|
||||
ts.fixtures.metadata("test_file").permissions().mode() & 0o777,
|
||||
0o750
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "feat_selinux")]
|
||||
fn test_mknod_selinux() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue