Skip to content

Commit 4b5022c

Browse files
mvo5sylvestre
andcommitted
tests: tweak changes to test_date.rs to be more idiomatic
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
1 parent 57d9dd7 commit 4b5022c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/by-util/test_date.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,12 @@ fn test_date_parse_from_format() {
415415
let (at, mut ucmd) = at_and_ucmd!();
416416
const FILE: &str = "file-with-dates";
417417

418-
std::fs::write(
419-
at.plus(FILE),
418+
at.write(
419+
FILE,
420420
"2023-03-27 08:30:00\n\
421421
2023-04-01 12:00:00\n\
422422
2023-04-15 18:30:00",
423-
)
424-
.unwrap();
423+
);
425424
ucmd.arg("-f")
426425
.arg(at.plus(FILE))
427426
.arg("+%Y-%m-%d %H:%M:%S")

0 commit comments

Comments
 (0)