mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mktemp: add test to . in template prefix
This commit is contained in:
parent
9e2c543cd4
commit
3d2f3fc5b1
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,7 @@ static TEST_TEMPLATE6: &str = "tempXXXlate"; // spell-checker:disable-line
|
||||||
static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line
|
static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
static TEST_TEMPLATE8: &str = "tempXXXl/ate";
|
static TEST_TEMPLATE8: &str = "tempXXXl/ate";
|
||||||
|
static TEST_TEMPLATE9: &str = "a.XXXX";
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
static TEST_TEMPLATE8: &str = "tempXXXl\\ate";
|
static TEST_TEMPLATE8: &str = "tempXXXl\\ate";
|
||||||
|
|
||||||
|
@ -569,6 +570,14 @@ fn test_template_path_separator() {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Test that a prefix with a point is valid.
|
||||||
|
#[test]
|
||||||
|
fn test_prefix_template_separator() {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&["-t", TEST_TEMPLATE9])
|
||||||
|
.succeeds();
|
||||||
|
}
|
||||||
|
|
||||||
/// Test that a suffix with a path separator is invalid.
|
/// Test that a suffix with a path separator is invalid.
|
||||||
#[test]
|
#[test]
|
||||||
fn test_suffix_path_separator() {
|
fn test_suffix_path_separator() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue