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:
commit
2086d04996
88 changed files with 725 additions and 221 deletions
|
@ -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()
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue