File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
tests/testsuite/cargo_tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -2318,3 +2318,52 @@ foo v1.0.0 ([ROOT]/foo)
2318
2318
"# ] ] )
2319
2319
. run ( ) ;
2320
2320
}
2321
+
2322
+ #[ cargo_test]
2323
+ fn no_proc_macro_order ( ) {
2324
+ Package :: new ( "dep" , "1.0.0" ) . publish ( ) ;
2325
+ Package :: new ( "pm" , "1.0.0" ) . proc_macro ( true ) . publish ( ) ;
2326
+ let p = project ( )
2327
+ . file (
2328
+ "Cargo.toml" ,
2329
+ r#"
2330
+ [package]
2331
+ name = "foo"
2332
+ version = "0.1.0"
2333
+
2334
+ [dependencies]
2335
+ pm = "1.0"
2336
+ dep = "1.0"
2337
+ "# ,
2338
+ )
2339
+ . file ( "src/lib.rs" , "" )
2340
+ . build ( ) ;
2341
+
2342
+ p. cargo ( "tree" )
2343
+ . with_stdout_data ( str![ [ r#"
2344
+ foo v0.1.0 ([ROOT]/foo)
2345
+ ├── dep v1.0.0
2346
+ └── pm v1.0.0 (proc-macro)
2347
+
2348
+ "# ] ] )
2349
+ . run ( ) ;
2350
+
2351
+ // no-proc-macro combined with other edge kinds
2352
+ p. cargo ( "tree -e normal,no-proc-macro" )
2353
+ . with_stdout_data ( str![ [ r#"
2354
+ foo v0.1.0 ([ROOT]/foo)
2355
+ └── dep v1.0.0
2356
+
2357
+ "# ] ] )
2358
+ . run ( ) ;
2359
+
2360
+ // change flag order, no-proc-macro takes no effect if followed by other flags
2361
+ p. cargo ( "tree -e no-proc-macro,normal" )
2362
+ . with_stdout_data ( str![ [ r#"
2363
+ foo v0.1.0 ([ROOT]/foo)
2364
+ ├── dep v1.0.0
2365
+ └── pm v1.0.0 (proc-macro)
2366
+
2367
+ "# ] ] )
2368
+ . run ( ) ;
2369
+ }
You can’t perform that action at this time.
0 commit comments