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

Merge branch 'main' into mktemp-set-dir-mode

This commit is contained in:
353fc443 aka Seagull 2022-05-16 19:07:18 +01:00 committed by 353fc443
commit 2086d04996
No known key found for this signature in database
GPG key ID: D58B14ED3D42A937
88 changed files with 725 additions and 221 deletions

View file

@ -2,6 +2,8 @@
use crate::common::util::*;
use uucore::display::Quotable;
use std::path::PathBuf;
use tempfile::tempdir;
@ -497,3 +499,15 @@ fn test_directory_permissions() {
assert!(metadata.is_dir());
assert_eq!(metadata.permissions().mode(), 0o40700);
}
/// Test that a template with a path separator is invalid.
#[test]
fn test_template_path_separator() {
new_ucmd!()
.args(&["-t", "a/bXXX"])
.fails()
.stderr_only(format!(
"mktemp: invalid template, {}, contains directory separator\n",
"a/bXXX".quote()
));
}