Skip to content

Commit

Permalink
Fix Windows test to copy testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Oct 13, 2024
1 parent 0786957 commit a71d3dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
use predicates::prelude::*;

mod util;
use util::run;
use util::{copy_of_testdata, run};

/// Only on Windows, backslash can be used as a path separator in filters.
#[test]
fn list_mutants_well_tested_exclude_folder_containing_backslash_on_windows() {
// This could be written more simply as `--exclude module` but we want to
// test that backslash is accepted.
let tmp = copy_of_testdata("with_child_directories");
run()
.arg("mutants")
.args(["--list", "--exclude", "**\\module\\**\\*.rs"])
.current_dir("testdata/with_child_directories")
.current_dir(tmp.path())
.assert()
.stdout(
predicates::str::contains(r"src/module")
Expand Down

0 comments on commit a71d3dd

Please sign in to comment.