changelog: test parsing

This commit is contained in:
Cadey Ratio 2020-05-31 12:57:58 -04:00
parent 604ee570a1
commit 730de12a63
2 changed files with 8 additions and 1 deletions

View File

@ -78,6 +78,9 @@ where
mod tests { mod tests {
#[test] #[test]
fn read_changelog() { fn read_changelog() {
assert!(super::read("CHANGELOG.md".into(), "0.1.0".into()).is_ok()); let res = super::read("testdata/basic.md".into(), "0.1.0".into());
assert!(res.is_ok());
let delta = res.unwrap();
assert_eq!(delta, "Hi there this is a test\\!\n### ADDED\n - something\n")
} }
} }

4
testdata/basic.md vendored Normal file
View File

@ -0,0 +1,4 @@
## 0.1.0
Hi there this is a test!
### ADDED
- something