Skip to content

Commit

Permalink
Better news about package changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Nov 11, 2023
1 parent 5b508ec commit fcd9257
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Unreleased

- Changed: `cargo mutants` now tries to match the behavior of `cargo test` when run within a workspace. If run in a package directory, it tests only that package. If run in a workspace that is not a package (a "virtual workspace"), it tests the configured default packages, or otherwise all packages. This can all be overridden with the `--package` or `--workspace` options.

- New: generate key-value map values from types like `BTreeMap<String, Vec<u8>>`.

- Changed: Send trace messages to stderr rather stdout, in part so that it won't pollute json output.

- New: `--package` option tests only mutants from that package.

## 23.10.0

- The baseline test (with no mutants) now tests only the packages in which
Expand Down
10 changes: 5 additions & 5 deletions book/src/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ By default, cargo-mutants has [the same behavior as Cargo](https://doc.rust-lang
* If the starting directory (or `-d` directory) is in a package, that package is tested.
* Otherwise, the starting directory must be in a virtual workspace. If it specifies default members, they are tested. Otherwise, all packages are tested.

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.

The baseline tests exercise all and only the packages for which mutants will
be generated.

You can also 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.

0 comments on commit fcd9257

Please sign in to comment.