Make sure README.md is tested.

Fixes #18.
This commit is contained in:
kennytm 2018-05-05 22:50:01 +08:00
parent a93111d930
commit 702e18b2a8
3 changed files with 6 additions and 3 deletions

View file

@ -32,7 +32,7 @@ install:
script:
- cargo test --no-default-features
- cargo test
- if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo bench --features=bench; fi
- if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo test --features bench && cargo bench --features bench; fi
- cargo test --target i686-$OS
after_success:

View file

@ -108,7 +108,7 @@ fn main() {
.dark_color(svg::Color("#800000"))
.light_color(svg::Color("#ffff80"))
.build();
println!("{}", string);
println!("{}", image);
}
```

View file

@ -29,12 +29,15 @@
//! }
//! ```
#![cfg_attr(feature = "bench", feature(test))] // Unstable libraries
#![cfg_attr(feature = "bench", feature(test, external_doc))] // Unstable libraries
#![cfg_attr(feature = "cargo-clippy", deny(warnings, clippy_pedantic))]
#![cfg_attr(feature = "cargo-clippy",
allow(unreadable_literal, missing_docs_in_private_items, shadow_reuse,
range_plus_one))]
#![cfg_attr(feature = "bench", doc(include = "../README.md"))]
// ^ make sure we can test our README.md.
extern crate checked_int_cast;
#[cfg(feature = "image")]
extern crate image;