Skip to content

Commit 8cd2a5a

Browse files
committed
Try to replace tmp paths in mac and win
1 parent 370599d commit 8cd2a5a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/tmc-langs-cli/tests/integration.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ fn sorted_list_of_files(path: &impl AsRef<Path>) -> Vec<String> {
4040
// wrapper for all sample exercise tests
4141
fn test(f: impl Fn(&Path)) {
4242
insta::with_settings!({filters => vec![
43-
// replace all /tmp/ paths which vary each test run
44-
(r"/tmp/\S*", "[PATH]")
43+
// replace all /tmp/ (linux), /var/ (macos) and C:\[..]\Temp\ (win) paths which vary each test run
44+
(r"/tmp/\S*", "[PATH]"),
45+
(r"/var/\S*", "[PATH]"),
46+
(r"C:\\\S*\\Temp\\\S*", "[PATH]"),
47+
// replace Windows-style path separators
48+
(r"\\", "/"),
4549
]}, {
4650
insta::glob!("sample_exercises/*/*", |exercise| {
4751
f(exercise)

0 commit comments

Comments
 (0)