rhysd / tui-textarea

Simple yet powerful multi-line text editor widget for ratatui and tui-rs
https://crates.io/crates/tui-textarea
MIT License
341 stars 63 forks source link

Cargo test fails #35

Closed pm100 closed 1 year ago

pm100 commented 1 year ago

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 1 year ago

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 1 year ago

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.