mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +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…
x
Reference in New Issue
Block a user