Skip to content

Commit

Permalink
fix: use platform agnostic filter paths for cheat tests (foundry-rs#2281
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mattsse authored Jul 12, 2022
1 parent 4ae40da commit 5c078f5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions forge/src/multi_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,13 @@ Reason: `setEnv` failed to set an environment variable `{}={}`",
#[test]
fn test_cheats_fork() {
let mut runner = runner();
let suite_result =
runner.test(&Filter::new(".*", ".*", ".*cheats/Fork"), None, true).unwrap();
let suite_result = runner
.test(
&Filter::new(".*", ".*", &format!(".*cheats{}Fork", std::path::MAIN_SEPARATOR)),
None,
true,
)
.unwrap();
assert!(!suite_result.is_empty());

for (_, SuiteResult { test_results, .. }) in suite_result {
Expand All @@ -1165,8 +1170,13 @@ Reason: `setEnv` failed to set an environment variable `{}={}`",
#[test]
fn test_cheats_local() {
let mut runner = runner();
let suite_result =
runner.test(&Filter::new(".*", ".*", ".*cheats/[^Fork]"), None, true).unwrap();
let suite_result = runner
.test(
&Filter::new(".*", ".*", &format!(".*cheats{}[^Fork]", std::path::MAIN_SEPARATOR)),
None,
true,
)
.unwrap();
assert!(!suite_result.is_empty());

for (_, SuiteResult { test_results, .. }) in suite_result {
Expand Down

0 comments on commit 5c078f5

Please sign in to comment.