https://github.com/trailofbits/cargo-line-test
Run tests by the lines they exercise
https://github.com/trailofbits/cargo-line-test
rust testing
Last synced: about 1 year ago
JSON representation
Run tests by the lines they exercise
- Host: GitHub
- URL: https://github.com/trailofbits/cargo-line-test
- Owner: trailofbits
- Created: 2024-09-04T09:53:45.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T10:47:08.000Z (about 1 year ago)
- Last Synced: 2025-04-14T11:38:58.580Z (about 1 year ago)
- Topics: rust, testing
- Language: Rust
- Homepage:
- Size: 90.8 KB
- Stars: 6
- Watchers: 8
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# cargo-line-test
Run tests by the lines they exercise
`cargo-line-test` relies on [`cargo-llvm-cov`] and requires it to be installed independently:
```sh
cargo install cargo-line-test cargo-llvm-cov
```
## Examples
```sh
# Build cargo-line-test database
cargo line-test --build
# Run the tests that exercise src/main.rs:99
cargo line-test --line src/main.rs:99
# Run the tests that exercise lines changed by diff
git diff | cargo line-test --diff
# Update the database following source code changes
cargo line-test --refresh
```
[`cargo-llvm-cov`]: https://crates.io/crates/cargo-llvm-cov