1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #4877 from cakebaker/mktemp_test_refactorings

mktemp: two small test refactorings
This commit is contained in:
Sylvestre Ledru 2023-05-19 12:16:07 +02:00 committed by GitHub
commit bf1bc1764f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,6 @@ static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line
static TEST_TEMPLATE8: &str = "tempXXXl/ate";
#[cfg(windows)]
static TEST_TEMPLATE8: &str = "tempXXXl\\ate";
static TEST_TEMPLATE9: &str = "a.XXXX";
#[cfg(not(windows))]
const TMPDIR: &str = "TMPDIR";
@ -573,9 +572,7 @@ fn test_template_path_separator() {
/// Test that a prefix with a point is valid.
#[test]
fn test_prefix_template_separator() {
new_ucmd!()
.args(&["-p", ".", "-t", TEST_TEMPLATE9])
.succeeds();
new_ucmd!().args(&["-p", ".", "-t", "a.XXXX"]).succeeds();
}
#[test]
@ -854,8 +851,7 @@ fn test_nonexistent_dir_prefix() {
#[test]
fn test_default_missing_value() {
let scene = TestScenario::new(util_name!());
scene.ucmd().arg("-d").arg("--tmpdir").succeeds();
new_ucmd!().arg("-d").arg("--tmpdir").succeeds();
}
#[test]