Skip to content

Commit ffce090

Browse files
committed
datetime, tree, pathnames: fix test errors now that clap has the error-context feature enabled
1 parent 40994b4 commit ffce090

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

datetime/tests/time/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ fn parse_error_test() {
8989

9090
#[test]
9191
fn command_error_test() {
92-
run_test_time(&["-s", "ls", "-l"], "", "unexpected argument found", 0);
92+
run_test_time(&["-s", "ls", "-l"], "", "unexpected argument '-s' found", 0);
9393
}

pathnames/tests/realpath/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn realpath_empty_path() {
131131
realpath_test(
132132
&[""],
133133
"",
134-
"error: one of the values isn't valid for an argument\n",
134+
"error: a value is required for '[PATH]...' but none was supplied\n\nFor more information, try '--help'.\n",
135135
2,
136136
);
137137
}

tree/tests/cp/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ fn test_cp_preserve_slink_time() {
440440
let dangle = &format!("{test_dir}/dangle");
441441
let d2 = &format!("{test_dir}/d2");
442442

443-
fs::create_dir(test_dir).unwrap();
443+
fs::create_dir(test_dir)
444+
.unwrap_or_else(|error| panic!("Error creating directory {test_dir:?}: {error:?}"));
444445

445446
unix::fs::symlink(no_such, dangle).unwrap();
446447

0 commit comments

Comments
 (0)