tests: ensure README version numbers are in sync

This commit is contained in:
Martin Geisler 2017-09-23 12:31:43 +02:00
parent 5536361bcd
commit e09c248fc1
4 changed files with 15 additions and 1 deletions

View file

@ -14,6 +14,12 @@ before_script:
- |
pip install git+git://github.com/kbknapp/travis-cargo.git --user &&
export PATH=$HOME/.local/bin:$PATH
- |
if [[ "$TRAVIS_RUST_VERSION" == "1.13.0" ]]; then
echo "Old Rust detected, removing version-sync dependency"
sed -i "/^version-sync =/d" Cargo.toml
rm "tests/version-numbers.rs"
fi
script:
- |
travis-cargo test -- --verbose --no-default-features &&

View file

@ -34,6 +34,7 @@ atty = { version = "0.2.2", optional = true }
[dev-dependencies]
regex = "0.2"
lazy_static = "0.2"
version-sync = "0.3"
[features]
default = ["suggestions", "color", "wrap_help"]

View file

@ -642,7 +642,7 @@ From @alexcrichton:
Right now Cargo's version resolution is pretty naive, it's just a brute-force search of the solution space, returning the first resolvable graph. This also means that it currently won't terminate until it proves there is not possible resolvable graph. This leads to situations where workspaces with multiple binaries, for example, have two different dependencies such as:
```toml
```toml,no_sync
# In one Cargo.toml
[dependencies]

7
tests/version-numbers.rs Normal file
View file

@ -0,0 +1,7 @@
#[macro_use]
extern crate version_sync;
#[test]
fn test_readme_deps() {
assert_markdown_deps_updated!("README.md");
}