diff --git a/src/changelog.rs b/src/changelog.rs index 2488d9e..9563104 100644 --- a/src/changelog.rs +++ b/src/changelog.rs @@ -78,6 +78,9 @@ where mod tests { #[test] 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") } } diff --git a/testdata/basic.md b/testdata/basic.md new file mode 100644 index 0000000..867bf81 --- /dev/null +++ b/testdata/basic.md @@ -0,0 +1,4 @@ +## 0.1.0 +Hi there this is a test! +### ADDED +- something