File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,70 @@ See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#lints for mo
67
67
. run ( ) ;
68
68
}
69
69
70
+ #[ cargo_test]
71
+ fn malformed_on_stable ( ) {
72
+ let foo = project ( )
73
+ . file (
74
+ "Cargo.toml" ,
75
+ r#"
76
+ lints = 20
77
+ [package]
78
+ name = "foo"
79
+ version = "0.0.1"
80
+ authors = []
81
+
82
+ "# ,
83
+ )
84
+ . file ( "src/lib.rs" , "" )
85
+ . build ( ) ;
86
+
87
+ foo. cargo ( "check" )
88
+ . with_status ( 101 )
89
+ . with_stderr (
90
+ "\
91
+ error: failed to parse manifest[..]
92
+
93
+ Caused by:
94
+ invalid type: integer `20`, expected a map
95
+ in `lints`
96
+ " ,
97
+ )
98
+ . run ( ) ;
99
+ }
100
+
101
+ #[ cargo_test]
102
+ fn malformed_on_nightly ( ) {
103
+ let foo = project ( )
104
+ . file (
105
+ "Cargo.toml" ,
106
+ r#"
107
+ cargo-features = ["lints"]
108
+ lints = 20
109
+ [package]
110
+ name = "foo"
111
+ version = "0.0.1"
112
+ authors = []
113
+
114
+ "# ,
115
+ )
116
+ . file ( "src/lib.rs" , "" )
117
+ . build ( ) ;
118
+
119
+ foo. cargo ( "check" )
120
+ . masquerade_as_nightly_cargo ( & [ "lints" ] )
121
+ . with_status ( 101 )
122
+ . with_stderr (
123
+ "\
124
+ error: failed to parse manifest[..]
125
+
126
+ Caused by:
127
+ invalid type: integer `20`, expected a map
128
+ in `lints`
129
+ " ,
130
+ )
131
+ . run ( ) ;
132
+ }
133
+
70
134
#[ cargo_test]
71
135
fn fail_on_invalid_tool ( ) {
72
136
let foo = project ( )
You can’t perform that action at this time.
0 commit comments