Skip to content

Commit

Permalink
More docs about workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Sep 14, 2023
1 parent f61df87 commit 9735525
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions book/src/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

cargo-mutants supports testing Cargo workspaces that contain multiple packages. The entire workspace tree is copied.

All source files in all packages in the workspace are tested.
By default, all source files in all packages in the workspace are tested.

For each mutant, only the containing package's tests are run, on the theory that each package's tests are responsible for testing the package's code.
You can use the `--file` options to restrict cargo-mutants to testing only files
from some subdirectory, e.g. with `-f "utils/**/*.rs"`. (Remember to quote globs
on the command line, so that the shell doesn't expand them.) You can use `--list` or
`--list-files` to preview the effect of filters.

For each mutant, only the containing package's tests are run, on the theory that
each package's tests are responsible for testing the package's code.

0 comments on commit 9735525

Please sign in to comment.