Skip to content

Commit

Permalink
Merge pull request #41 from artichoke/version-sync-version-numbers-test
Browse files Browse the repository at this point in the history
Add tests to ensure crate version numbers are properly updated on release
  • Loading branch information
lopopolo authored Jun 14, 2021
2 parents d04799f + 41a13de commit 06bf236
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ log = "0.4.6"
rustc-hash = { version = "1.1", default-features = false }

[dev-dependencies]
# Enable debug and trace-level logging in tests.
env_logger = { version = "0.8.4", default-features = false }
# Check that crate versions are properly updated in documentation and code when
# bumping the version.
version-sync = "0.9, >= 0.9.2"
11 changes: 11 additions & 0 deletions tests/version_numbers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#[test]
#[cfg(not(miri))]
fn test_readme_deps() {
version_sync::assert_markdown_deps_updated!("README.md");
}

#[test]
#[cfg(not(miri))]
fn test_html_root_url() {
version_sync::assert_html_root_url_updated!("src/lib.rs");
}

0 comments on commit 06bf236

Please sign in to comment.