From 3d2f3fc5b155a1ba9161e921ffbdf763f671712f Mon Sep 17 00:00:00 2001 From: ZauJulio Date: Wed, 22 Feb 2023 20:22:16 -0300 Subject: [PATCH] mktemp: add test to . in template prefix --- tests/by-util/test_mktemp.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/by-util/test_mktemp.rs b/tests/by-util/test_mktemp.rs index d6926c41b..6d4a7fb6f 100644 --- a/tests/by-util/test_mktemp.rs +++ b/tests/by-util/test_mktemp.rs @@ -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() {