diff --git a/tests/by-util/test_mkfifo.rs b/tests/by-util/test_mkfifo.rs index 707adf71c..b90fc0c95 100644 --- a/tests/by-util/test_mkfifo.rs +++ b/tests/by-util/test_mkfifo.rs @@ -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] diff --git a/tests/by-util/test_mknod.rs b/tests/by-util/test_mknod.rs index 34136b828..5d2b08aec 100644 --- a/tests/by-util/test_mknod.rs +++ b/tests/by-util/test_mknod.rs @@ -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() {