mirror of
https://github.com/rust-lang/cargo
synced 2024-08-25 10:35:53 +00:00
teset(pkgid): suggestion for bad parsing
This commit is contained in:
parent
a22b3ac207
commit
ade33c20d1
|
@ -54,6 +54,7 @@ fn suggestion_bad_pkgid() {
|
|||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.file("cratesio", "")
|
||||
.build();
|
||||
|
||||
p.cargo("generate-lockfile").run();
|
||||
|
@ -106,6 +107,21 @@ error: invalid package ID specification: `./Cargo.toml`
|
|||
|
||||
Caused by:
|
||||
package ID specification `./Cargo.toml` looks like a file path, maybe try file://[..]/Cargo.toml
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
// Bad file URL with simliar name.
|
||||
p.cargo("pkgid './cratesio'")
|
||||
.with_status(101)
|
||||
.with_stderr(
|
||||
"\
|
||||
error: invalid package ID specification: `./cratesio`
|
||||
|
||||
<tab>Did you mean `crates-io`?
|
||||
|
||||
Caused by:
|
||||
package ID specification `./cratesio` looks like a file path, maybe try file://[..]/cratesio
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
|
Loading…
Reference in a new issue