@@ -37,6 +37,7 @@ fn simple() {
37
37
assert_that ( p. cargo_process ( "package" ) ,
38
38
execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
39
39
[WARNING] manifest has no documentation[..]
40
+ See [..]
40
41
[PACKAGING] foo v0.0.1 ({dir})
41
42
[VERIFYING] foo v0.0.1 ({dir})
42
43
[COMPILING] foo v0.0.1 ({dir}[..])
@@ -82,8 +83,8 @@ fn metadata_warning() {
82
83
assert_that ( p. cargo_process ( "package" ) ,
83
84
execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
84
85
warning: manifest has no description, license, license-file, documentation, \
85
- homepage or repository. See \
86
- http://doc.crates.io/manifest.html#package-metadata for more info.
86
+ homepage or repository.
87
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
87
88
[PACKAGING] foo v0.0.1 ({dir})
88
89
[VERIFYING] foo v0.0.1 ({dir})
89
90
[COMPILING] foo v0.0.1 ({dir}[..])
@@ -104,8 +105,8 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
104
105
"# ) ;
105
106
assert_that ( p. cargo_process ( "package" ) ,
106
107
execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
107
- warning: manifest has no description, documentation, homepage or repository. See \
108
- http://doc.crates.io/manifest.html#package-metadata for more info.
108
+ warning: manifest has no description, documentation, homepage or repository.
109
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
109
110
[PACKAGING] foo v0.0.1 ({dir})
110
111
[VERIFYING] foo v0.0.1 ({dir})
111
112
[COMPILING] foo v0.0.1 ({dir}[..])
@@ -165,6 +166,7 @@ fn package_verbose() {
165
166
assert_that ( cargo. clone ( ) . arg ( "package" ) . arg ( "-v" ) . arg ( "--no-verify" ) ,
166
167
execs ( ) . with_status ( 0 ) . with_stderr ( "\
167
168
[WARNING] manifest has no description[..]
169
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
168
170
[PACKAGING] foo v0.0.1 ([..])
169
171
[ARCHIVING] [..]
170
172
[ARCHIVING] [..]
@@ -175,6 +177,7 @@ fn package_verbose() {
175
177
. cwd ( p. root ( ) . join ( "a" ) ) ,
176
178
execs ( ) . with_status ( 0 ) . with_stderr ( "\
177
179
[WARNING] manifest has no description[..]
180
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
178
181
[PACKAGING] a v0.0.1 ([..])
179
182
[ARCHIVING] [..]
180
183
[ARCHIVING] [..]
@@ -198,6 +201,7 @@ fn package_verification() {
198
201
assert_that ( p. cargo ( "package" ) ,
199
202
execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
200
203
[WARNING] manifest has no description[..]
204
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
201
205
[PACKAGING] foo v0.0.1 ({dir})
202
206
[VERIFYING] foo v0.0.1 ({dir})
203
207
[COMPILING] foo v0.0.1 ({dir}[..])
@@ -206,6 +210,38 @@ fn package_verification() {
206
210
dir = p. url( ) ) ) ) ;
207
211
}
208
212
213
+ #[ test]
214
+ fn path_dependency_no_version ( ) {
215
+ let p = project ( "foo" )
216
+ . file ( "Cargo.toml" , r#"
217
+ [project]
218
+ name = "foo"
219
+ version = "0.0.1"
220
+ authors = []
221
+ license = "MIT"
222
+ description = "foo"
223
+
224
+ [dependencies.bar]
225
+ path = "bar"
226
+ "# )
227
+ . file ( "src/main.rs" , "fn main() {}" )
228
+ . file ( "bar/Cargo.toml" , r#"
229
+ [package]
230
+ name = "bar"
231
+ version = "0.0.1"
232
+ authors = []
233
+ "# )
234
+ . file ( "bar/src/lib.rs" , "" ) ;
235
+
236
+ assert_that ( p. cargo_process ( "package" ) ,
237
+ execs ( ) . with_status ( 101 ) . with_stderr ( "\
238
+ [WARNING] manifest has no documentation, homepage or repository.
239
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
240
+ [ERROR] all path dependencies must have a version specified when packaging.
241
+ dependency `bar` does not specify a version.
242
+ " ) ) ;
243
+ }
244
+
209
245
#[ test]
210
246
fn exclude ( ) {
211
247
let p = project ( "foo" )
@@ -225,6 +261,7 @@ fn exclude() {
225
261
assert_that ( p. cargo_process ( "package" ) . arg ( "--no-verify" ) . arg ( "-v" ) ,
226
262
execs ( ) . with_status ( 0 ) . with_stderr ( "\
227
263
[WARNING] manifest has no description[..]
264
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
228
265
[PACKAGING] foo v0.0.1 ([..])
229
266
[ARCHIVING] [..]
230
267
[ARCHIVING] [..]
@@ -251,6 +288,7 @@ fn include() {
251
288
assert_that ( p. cargo_process ( "package" ) . arg ( "--no-verify" ) . arg ( "-v" ) ,
252
289
execs ( ) . with_status ( 0 ) . with_stderr ( "\
253
290
[WARNING] manifest has no description[..]
291
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
254
292
[PACKAGING] foo v0.0.1 ([..])
255
293
[ARCHIVING] [..]
256
294
[ARCHIVING] [..]
@@ -360,6 +398,7 @@ fn ignore_nested() {
360
398
assert_that ( p. cargo_process ( "package" ) ,
361
399
execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
362
400
[WARNING] manifest has no documentation[..]
401
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
363
402
[PACKAGING] nested v0.0.1 ({dir})
364
403
[VERIFYING] nested v0.0.1 ({dir})
365
404
[COMPILING] nested v0.0.1 ({dir}[..])
@@ -408,6 +447,7 @@ fn package_weird_characters() {
408
447
assert_that ( p. cargo_process ( "package" ) ,
409
448
execs ( ) . with_status ( 101 ) . with_stderr ( "\
410
449
warning: [..]
450
+ See [..]
411
451
[PACKAGING] foo [..]
412
452
[ERROR] failed to prepare local package for uploading
413
453
@@ -448,6 +488,7 @@ fn repackage_on_source_change() {
448
488
// Check that cargo rebuilds the tarball
449
489
assert_that ( pro, execs ( ) . with_status ( 0 ) . with_stderr ( & format ! ( "\
450
490
[WARNING] [..]
491
+ See [..]
451
492
[PACKAGING] foo v0.0.1 ({dir})
452
493
[VERIFYING] foo v0.0.1 ({dir})
453
494
[COMPILING] foo v0.0.1 ({dir}[..])
0 commit comments