mktemp: add test to . in template prefix

This commit is contained in:
ZauJulio 2023-02-22 20:22:16 -03:00
parent 9e2c543cd4
commit 3d2f3fc5b1
No known key found for this signature in database
GPG key ID: 5AC499A308A063B8

View file

@ -21,6 +21,7 @@ static TEST_TEMPLATE6: &str = "tempXXXlate"; // spell-checker:disable-line
static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line
#[cfg(unix)]
static TEST_TEMPLATE8: &str = "tempXXXl/ate";
static TEST_TEMPLATE9: &str = "a.XXXX";
#[cfg(windows)]
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]
fn test_suffix_path_separator() {