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() {
54
54
"# ,
55
55
)
56
56
. file ( "src/lib.rs" , "" )
57
+ . file ( "cratesio" , "" )
57
58
. build ( ) ;
58
59
59
60
p. cargo ( "generate-lockfile" ) . run ( ) ;
@@ -106,6 +107,21 @@ error: invalid package ID specification: `./Cargo.toml`
106
107
107
108
Caused by:
108
109
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
109
125
" ,
110
126
)
111
127
. run ( ) ;
You can’t perform that action at this time.
0 commit comments