Skip to content

Commit 6f43769

Browse files
Add tests for README file
1 parent cc25041 commit 6f43769

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ exclude = ["/.travis.yml", "/dev"]
1616

1717
[badges]
1818
travis-ci = { repository = "dguo/strsim-rs" }
19+
20+
[dev-dependencies]
21+
doc-comment = "0.3"

src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
//! This library implements string similarity metrics.
22
3+
#[cfg(test)]
4+
#[macro_use]
5+
extern crate doc_comment;
6+
7+
#[cfg(test)]
8+
doctest!("../README.md");
9+
310
use std::char;
411
use std::cmp::{max, min};
512
use std::collections::HashMap;

0 commit comments

Comments
 (0)