test(pkgid): bad file URL suggestion

This commit is contained in:
Weihang Lo 2021-03-02 08:40:59 +08:00
parent 1bbc0569b9
commit 2e3a74cc95
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -93,6 +93,19 @@ Did you mean one of these?
two-ver:0.1.0
two-ver:0.2.0
",
)
.run();
// Bad file URL.
p.cargo("pkgid ./Cargo.toml")
.with_status(101)
.with_stderr(
"\
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();