mirror of
https://github.com/aphrody-labs/uutils-coreutils.git
synced 2026-10-13 21:07:43 +00:00
touch: accept Unix permission errors in test
This commit is contained in:
1 parent
b43c45a9fa
commit
cb4392c25e
1 file changed
+6
-4
@@ -985,10 +985,12 @@ fn test_touch_existing_unwritable_file_error_msg() {
|
||||
.args(&["-d", "2000-01-01", path])
|
||||
.fails()
|
||||
.stderr_only("touch: cannot touch '/etc/passwd': Permission denied\n");
|
||||
new_ucmd!()
|
||||
.args(&["-c", path])
|
||||
.fails()
|
||||
.stderr_only("touch: setting times of '/etc/passwd': Permission denied\n");
|
||||
let result = new_ucmd!().args(&["-c", path]).fails();
|
||||
assert!(matches!(
|
||||
result.stderr_str(),
|
||||
"touch: setting times of '/etc/passwd': Permission denied\n"
|
||||
| "touch: setting times of '/etc/passwd': Operation not permitted\n"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user