Skip to content

Commit 82cb88a

Browse files
committed
test_pr: Use new_ucmd!() directly
1 parent bdedd24 commit 82cb88a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/by-util/test_pr.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ fn test_with_date_format() {
414414
.stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]);
415415

416416
// "Format" doesn't need to contain any replaceable token.
417-
let mut scenario = new_ucmd!();
418-
scenario
417+
new_ucmd!()
419418
.args(&[test_file_path, "-D", "Hello!"])
420419
.succeeds()
421420
.stdout_is_templated_fixture(
@@ -424,8 +423,7 @@ fn test_with_date_format() {
424423
);
425424

426425
// Long option also works
427-
let mut scenario = new_ucmd!();
428-
scenario
426+
new_ucmd!()
429427
.args(&[test_file_path, "--date-format=Hello!"])
430428
.succeeds()
431429
.stdout_is_templated_fixture(
@@ -434,8 +432,7 @@ fn test_with_date_format() {
434432
);
435433

436434
// Option takes precedence over environment variables
437-
let mut scenario = new_ucmd!();
438-
scenario
435+
new_ucmd!()
439436
.env("POSIXLY_CORRECT", "1")
440437
.env("LC_TIME", "POSIX")
441438
.args(&[test_file_path, "-D", "Hello!"])

0 commit comments

Comments
 (0)