mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-16 03:36:18 +00:00
Merge pull request #3573 from jfinkels/mktemp-simpler-prefix-suffix
mktemp: simplify file path parameter logic
This commit is contained in:
commit
2ed64fc9a1
2 changed files with 230 additions and 176 deletions
|
@ -519,6 +519,7 @@ fn test_directory_permissions() {
|
|||
/// Test that a template with a path separator is invalid.
|
||||
#[test]
|
||||
fn test_template_path_separator() {
|
||||
#[cfg(not(windows))]
|
||||
new_ucmd!()
|
||||
.args(&["-t", "a/bXXX"])
|
||||
.fails()
|
||||
|
@ -526,6 +527,14 @@ fn test_template_path_separator() {
|
|||
"mktemp: invalid template, {}, contains directory separator\n",
|
||||
"a/bXXX".quote()
|
||||
));
|
||||
#[cfg(windows)]
|
||||
new_ucmd!()
|
||||
.args(&["-t", r"a\bXXX"])
|
||||
.fails()
|
||||
.stderr_only(format!(
|
||||
"mktemp: invalid template, {}, contains directory separator\n",
|
||||
r"a\bXXX".quote()
|
||||
));
|
||||
}
|
||||
|
||||
/// Test that a suffix with a path separator is invalid.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue