From 82cb88ac0df4e7c92ade95bcde5f56c308e3141e Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 31 Jul 2025 22:07:59 +0800 Subject: [PATCH] test_pr: Use new_ucmd!() directly --- tests/by-util/test_pr.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs index 06405bd07..c2f9e84fb 100644 --- a/tests/by-util/test_pr.rs +++ b/tests/by-util/test_pr.rs @@ -414,8 +414,7 @@ fn test_with_date_format() { .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); // "Format" doesn't need to contain any replaceable token. - let mut scenario = new_ucmd!(); - scenario + new_ucmd!() .args(&[test_file_path, "-D", "Hello!"]) .succeeds() .stdout_is_templated_fixture( @@ -424,8 +423,7 @@ fn test_with_date_format() { ); // Long option also works - let mut scenario = new_ucmd!(); - scenario + new_ucmd!() .args(&[test_file_path, "--date-format=Hello!"]) .succeeds() .stdout_is_templated_fixture( @@ -434,8 +432,7 @@ fn test_with_date_format() { ); // Option takes precedence over environment variables - let mut scenario = new_ucmd!(); - scenario + new_ucmd!() .env("POSIXLY_CORRECT", "1") .env("LC_TIME", "POSIX") .args(&[test_file_path, "-D", "Hello!"])