Skip to content

Commit

Permalink
Automatically test code examples in the README file (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and carllerche committed Jul 15, 2019
1 parent cece1b8 commit 192b172
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -33,6 +33,7 @@ rand = "0.4"
seahash = "3.0.5"
serde = "1.0"
serde_json = "1.0"
doc-comment = "0.3"

[[bench]]
name = "header_map"
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Expand Up @@ -163,6 +163,13 @@ extern crate bytes;
extern crate fnv;
extern crate itoa;

#[cfg(test)]
#[macro_use]
extern crate doc_comment;

#[cfg(test)]
doctest!("../README.md");

pub mod header;
pub mod method;
pub mod request;
Expand Down

0 comments on commit 192b172

Please sign in to comment.