@@ -52,6 +52,41 @@ Caused by:
52
52
. run ( ) ;
53
53
}
54
54
55
+ #[ cargo_test]
56
+ fn explicit_version_prefixing_v ( ) {
57
+ let registry = registry:: init ( ) ;
58
+ setup ( "foo" , "0.0.1" ) ;
59
+
60
+ let p = project ( )
61
+ . file (
62
+ "Cargo.toml" ,
63
+ r#"
64
+ [package]
65
+ name = "foo"
66
+ version = "0.0.1"
67
+ authors = []
68
+ license = "MIT"
69
+ description = "foo"
70
+ "# ,
71
+ )
72
+ . file ( "src/main.rs" , "fn main() {}" )
73
+ . build ( ) ;
74
+
75
+ p. cargo ( "yank --version v0.0.1" )
76
+ . replace_crates_io ( registry. index_url ( ) )
77
+ . with_status ( 101 )
78
+ . with_stderr_data ( str![ [ r#"
79
+ [UPDATING] crates.io index
80
+
81
+ [ERROR] failed to yank from the registry at [ROOTURL]/api
82
+
83
+ Caused by:
84
+ [37] Could not read a file:// file (Couldn't open file [ROOT]/api/api/v1/crates/foo/v0.0.1/yank)
85
+
86
+ "# ] ] )
87
+ . run ( ) ;
88
+ }
89
+
55
90
#[ cargo_test]
56
91
fn explicit_version_with_asymmetric ( ) {
57
92
let registry = registry:: RegistryBuilder :: new ( )
@@ -129,6 +164,41 @@ Caused by:
129
164
. run ( ) ;
130
165
}
131
166
167
+ #[ cargo_test]
168
+ fn inline_version_prefixing_v ( ) {
169
+ let registry = registry:: init ( ) ;
170
+ setup ( "foo" , "0.0.1" ) ;
171
+
172
+ let p = project ( )
173
+ . file (
174
+ "Cargo.toml" ,
175
+ r#"
176
+ [package]
177
+ name = "foo"
178
+ version = "0.0.1"
179
+ authors = []
180
+ license = "MIT"
181
+ description = "foo"
182
+ "# ,
183
+ )
184
+ . file ( "src/main.rs" , "fn main() {}" )
185
+ . build ( ) ;
186
+
187
+
188
+ . replace_crates_io ( registry. index_url ( ) )
189
+ . with_status ( 101 )
190
+ . with_stderr_data ( str![ [ r#"
191
+ [UPDATING] crates.io index
192
+
193
+ [ERROR] failed to yank from the registry at [ROOTURL]/api
194
+
195
+ Caused by:
196
+ [37] Could not read a file:// file (Couldn't open file [ROOT]/api/api/v1/crates/foo/v0.0.1/yank)
197
+
198
+ "# ] ] )
199
+ . run ( ) ;
200
+ }
201
+
132
202
#[ cargo_test]
133
203
fn version_required ( ) {
134
204
setup ( "foo" , "0.0.1" ) ;
0 commit comments