Skip to content

Commit

Permalink
Test --list-files --json in workspace subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Sep 14, 2023
1 parent 54c29b1 commit f61df87
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,30 @@ fn list_files_json_workspace() {
.assert_insta("list_files_json_workspace");
}

#[test]
fn list_files_as_json_in_workspace_subdir() {
run()
.args(["mutants", "--list-files", "--json"])
.current_dir("testdata/tree/workspace/main2")
.assert()
.stdout(indoc! {r#"
[
{
"package": "cargo_mutants_testdata_workspace_utils",
"path": "utils/src/lib.rs"
},
{
"package": "main",
"path": "main/src/main.rs"
},
{
"package": "main2",
"path": "main2/src/main.rs"
}
]
"#});
}

#[test]
fn workspace_tree_is_well_tested() {
let tmp_src_dir = copy_of_testdata("workspace");
Expand Down

0 comments on commit f61df87

Please sign in to comment.