@@ -232,6 +232,11 @@ fn unused() {
232232 . with_stderr (
233233 "\
234234 [UPDATING] `[ROOT][..]` index
235+ [WARNING] Patch `bar v0.2.0 ([CWD]/bar)` was not used in the crate graph.
236+ [..]
237+ [..]
238+ [..]
239+ [..]
235240[DOWNLOADING] crates ...
236241[DOWNLOADED] bar v0.1.0 [..]
237242[COMPILING] bar v0.1.0
@@ -240,7 +245,18 @@ fn unused() {
240245" ,
241246 )
242247 . 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 ( ) ;
244260
245261 // unused patch should be in the lock file
246262 let mut lock = String :: new ( ) ;
@@ -293,6 +309,11 @@ fn unused_git() {
293309 "\
294310 [UPDATING] git repository `file://[..]`
295311[UPDATING] `[ROOT][..]` index
312+ [WARNING] Patch `bar v0.2.0 ([..])` was not used in the crate graph.
313+ [..]
314+ [..]
315+ [..]
316+ [..]
296317[DOWNLOADING] crates ...
297318[DOWNLOADED] bar v0.1.0 [..]
298319[COMPILING] bar v0.1.0
@@ -301,7 +322,18 @@ fn unused_git() {
301322" ,
302323 )
303324 . 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 ( ) ;
305337}
306338
307339#[ test]
@@ -419,9 +451,38 @@ fn add_ignored_patch() {
419451 ) ) ;
420452
421453 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+ )
423485 . run ( ) ;
424- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
425486}
426487
427488#[ test]
0 commit comments