Cargo test fails
pm100 opened this issue · 2 comments
pm100 commented
It tries to compile src/lib.rs, which I includes the readme that has invalid code marked as rust.
I looked at ci.yaml and that seems to not exclude it, but it gets excluded anyway. I don't understand why. But really plain n 'cargo test' should work.
rhysd commented
It was fixed at #34. Please update your local main
branch to the latest then try:
cargo test --features search
Note that tests for search
feature is not run by cargo test
since the feature is disabled by default
rhysd commented
I don't understand why.
Please read README.md
as text file. The trick is using rust,ignore
code block instead of rust
.
...
```rust,ignore
fn main() {
// ...
}
```
...
ignore
marks that the code block should be skipped by doc test.