Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit827ed2e

Browse files
committed
tests: ensure version numbers in README are always up to date
This adds a test that will check the examples in README.md for thecurrent package version.It also checks that there is a Markdown heading mentioning (at least)the current version. This serves as a simple check that the change logsection is updated when the version number is bumped.Related to#30,#41,#47, and#48.
1 parentfc5d1d5 commit827ed2e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ no_std = [] # This is a no-op, preserved for backward compatibility only.
2323

2424
[dev-dependencies]
2525
quickcheck ="0.7"
26+
version-sync ="0.8"

‎tests/version-numbers.rs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#[test]
2+
fntest_readme_deps(){
3+
version_sync::assert_markdown_deps_updated!("README.md");
4+
}
5+
6+
#[test]
7+
fntest_readme_changelog(){
8+
version_sync::assert_contains_regex!("README.md",r"^## {version}$");
9+
}
10+
11+
#[test]
12+
fntest_html_root_url(){
13+
version_sync::assert_html_root_url_updated!("src/lib.rs");
14+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp