Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjarkk committed Jun 1, 2020
1 parent c4e150b commit 91f6617
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,36 @@ This will be considered an error in future versions
.run();
}

#[cargo_test]
fn fragment_in_git_url() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.0"
authors = []
[dependencies.bar]
git = "http://127.0.0.1#foo"
"#,
)
.file("src/lib.rs", "")
.build();

p.cargo("build -v")
.with_status(101)
.with_stderr_contains(
"\
[WARNING] URL fragment `#foo` in git URL is ignored for dependency (bar). \
If you were trying to specify a specific git revision, \
use `rev = \"foo\"` in the dependency declaration.
",
)
.run();
}

#[cargo_test]
fn bad_source_config1() {
let p = project()
Expand Down

0 comments on commit 91f6617

Please sign in to comment.