mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
tests: ensure README version numbers are in sync
This commit is contained in:
parent
5536361bcd
commit
e09c248fc1
4 changed files with 15 additions and 1 deletions
|
@ -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 &&
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
7
tests/version-numbers.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate version_sync;
|
||||
|
||||
#[test]
|
||||
fn test_readme_deps() {
|
||||
assert_markdown_deps_updated!("README.md");
|
||||
}
|
Loading…
Reference in a new issue