File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ fn suggestion_bad_pkgid() {
5454 "# ,
5555 )
5656 . file ( "src/lib.rs" , "" )
57+ . file ( "cratesio" , "" )
5758 . build ( ) ;
5859
5960 p. cargo ( "generate-lockfile" ) . run ( ) ;
@@ -106,6 +107,21 @@ error: invalid package ID specification: `./Cargo.toml`
106107
107108Caused by:
108109 package ID specification `./Cargo.toml` looks like a file path, maybe try file://[..]/Cargo.toml
110+ " ,
111+ )
112+ . run ( ) ;
113+
114+ // Bad file URL with simliar name.
115+ p. cargo ( "pkgid './cratesio'" )
116+ . with_status ( 101 )
117+ . with_stderr (
118+ "\
119+ error: invalid package ID specification: `./cratesio`
120+
121+ <tab>Did you mean `crates-io`?
122+
123+ Caused by:
124+ package ID specification `./cratesio` looks like a file path, maybe try file://[..]/cratesio
109125" ,
110126 )
111127 . run ( ) ;
You can’t perform that action at this time.
0 commit comments