Skip to content

Commit 58d149d

Browse files
committed
make path testing more robust across os's
1 parent 63ddd2d commit 58d149d

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/patch.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,15 @@ mod tests {
497497
FilePatch::new("not_a_real_file.csv").with_replacement(&["x,y", "1,2"]),
498498
);
499499

500-
assert_error!(
501-
model_patch.build_to_tempdir(),
502-
"Base file for patching does not exist: examples/simple/not_a_real_file.csv"
500+
let expected = format!(
501+
"Base file for patching does not exist: {}",
502+
std::path::PathBuf::from("examples")
503+
.join("simple")
504+
.join("not_a_real_file.csv")
505+
.display()
503506
);
507+
508+
assert_error!(model_patch.build_to_tempdir(), expected);
504509
}
505510

506511
#[test]

0 commit comments

Comments
 (0)