@@ -232,6 +232,11 @@ fn unused() {
232
232
. with_stderr (
233
233
"\
234
234
[UPDATING] `[ROOT][..]` index
235
+ [WARNING] Patch `bar v0.2.0 ([CWD]/bar)` was not used in the crate graph.
236
+ [..]
237
+ [..]
238
+ [..]
239
+ [..]
235
240
[DOWNLOADING] crates ...
236
241
[DOWNLOADED] bar v0.1.0 [..]
237
242
[COMPILING] bar v0.1.0
@@ -240,7 +245,18 @@ fn unused() {
240
245
" ,
241
246
)
242
247
. run ( ) ;
243
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
248
+ p. cargo ( "build" )
249
+ . with_stderr (
250
+ "\
251
+ [WARNING] Patch `bar v0.2.0 ([CWD]/bar)` was not used in the crate graph.
252
+ [..]
253
+ [..]
254
+ [..]
255
+ [..]
256
+ [FINISHED] [..]
257
+ " ,
258
+ )
259
+ . run ( ) ;
244
260
245
261
// unused patch should be in the lock file
246
262
let mut lock = String :: new ( ) ;
@@ -293,6 +309,11 @@ fn unused_git() {
293
309
"\
294
310
[UPDATING] git repository `file://[..]`
295
311
[UPDATING] `[ROOT][..]` index
312
+ [WARNING] Patch `bar v0.2.0 ([..])` was not used in the crate graph.
313
+ [..]
314
+ [..]
315
+ [..]
316
+ [..]
296
317
[DOWNLOADING] crates ...
297
318
[DOWNLOADED] bar v0.1.0 [..]
298
319
[COMPILING] bar v0.1.0
@@ -301,7 +322,18 @@ fn unused_git() {
301
322
" ,
302
323
)
303
324
. run ( ) ;
304
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
325
+ p. cargo ( "build" )
326
+ . with_stderr (
327
+ "\
328
+ [WARNING] Patch `bar v0.2.0 ([..])` was not used in the crate graph.
329
+ [..]
330
+ [..]
331
+ [..]
332
+ [..]
333
+ [FINISHED] [..]
334
+ " ,
335
+ )
336
+ . run ( ) ;
305
337
}
306
338
307
339
#[ test]
@@ -419,9 +451,38 @@ fn add_ignored_patch() {
419
451
) ) ;
420
452
421
453
p. cargo ( "build" )
422
- . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
454
+ . with_stderr (
455
+ "\
456
+ [WARNING] Patch `bar v0.1.1 ([CWD]/bar)` was not used in the crate graph.
457
+ [..]
458
+ [..]
459
+ [..]
460
+ [..]
461
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" ,
462
+ )
463
+ . run ( ) ;
464
+ p. cargo ( "build" )
465
+ . with_stderr (
466
+ "\
467
+ [WARNING] Patch `bar v0.1.1 ([CWD]/bar)` was not used in the crate graph.
468
+ [..]
469
+ [..]
470
+ [..]
471
+ [..]
472
+ [FINISHED] [..]" ,
473
+ )
474
+ . run ( ) ;
475
+
476
+ p. cargo ( "update" ) . run ( ) ;
477
+ p. cargo ( "build" )
478
+ . with_stderr (
479
+ "\
480
+ [COMPILING] bar v0.1.1 ([CWD]/bar)
481
+ [COMPILING] foo v0.0.1 ([CWD])
482
+ [FINISHED] dev [..]
483
+ " ,
484
+ )
423
485
. run ( ) ;
424
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
425
486
}
426
487
427
488
#[ test]
0 commit comments