File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -2641,6 +2641,39 @@ fn bad_dependency() {
2641
2641
. run ( ) ;
2642
2642
}
2643
2643
2644
+ #[ cargo_test]
2645
+ fn bad_boolean_dependency ( ) {
2646
+ let p = project ( )
2647
+ . file (
2648
+ "Cargo.toml" ,
2649
+ r#"
2650
+ [package]
2651
+ name = "foo"
2652
+ version = "0.0.0"
2653
+ edition = "2015"
2654
+ authors = []
2655
+
2656
+ [dependencies]
2657
+ bar = true
2658
+ "# ,
2659
+ )
2660
+ . file ( "src/lib.rs" , "" )
2661
+ . build ( ) ;
2662
+
2663
+ p. cargo ( "check" )
2664
+ . with_status ( 101 )
2665
+ . with_stderr_data ( str![ [ r#"
2666
+ [ERROR] invalid type: boolean `true`, expected a version string like "0.9.8" or a detailed dependency like { version = "0.9.8" }
2667
+ --> Cargo.toml:9:23
2668
+ |
2669
+ 9 | bar = true
2670
+ | ^^^^
2671
+ |
2672
+
2673
+ "# ] ] )
2674
+ . run ( ) ;
2675
+ }
2676
+
2644
2677
#[ cargo_test]
2645
2678
fn bad_debuginfo ( ) {
2646
2679
let p = project ( )
You can’t perform that action at this time.
0 commit comments