8000 mktemp: two small test refactorings by cakebaker · Pull Request #4877 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mktemp: two small test refactorings #4877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tests/by-util/test_mktemp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
0