Skip to content

Commit

Permalink
Fix broken test in Windows
Browse files Browse the repository at this point in the history
Due to the nature of Windows using backslash instead of regular slash to
separate the directories, the test would fail because it was using a
hardcoded output. To address that was changed the method to evaluate the
output to a more flexible one, that way the backslash would not be a
problem.
  • Loading branch information
luigieli committed Jul 6, 2024
1 parent c181a44 commit ce8c1b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/by-util/test_cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5614,7 +5614,7 @@ fn test_symlink_to_subdir() {
ucmd.args(&["--symbolic", "file", "dir"])
.fails()
.no_stdout()
.stderr_is("cp: dir/file: can make relative symbolic links only in current directory\n");
.stderr_contains("can make relative symbolic links only in current directory\n");

assert!(at.dir_exists("dir"));
assert!(!at.file_exists("dir/file"));
Expand Down

0 comments on commit ce8c1b0

Please sign in to comment.