File tree Expand file tree Collapse file tree 1 file changed +61
-1
lines changed Expand file tree Collapse file tree 1 file changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,67 @@ fn unknown_feature() {
173
173
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
174
174
175
175
Caused by:
176
- unknown cargo feature `foo`
176
+ unknown Cargo.toml feature `foo`
177
+
178
+ See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html for more information.
179
+
180
+ "# ] ] )
181
+ . run ( ) ;
182
+ }
183
+
184
+ #[ cargo_test]
185
+ fn wrong_kind_of_feature ( ) {
186
+ let p = project ( )
187
+ . file (
188
+ "Cargo.toml" ,
189
+ r#"
190
+ cargo-features = ["build-dir"]
191
+
192
+ [package]
193
+ name = "a"
194
+ version = "0.0.1"
195
+ edition = "2015"
196
+ authors = []
197
+ "# ,
198
+ )
199
+ . file ( "src/lib.rs" , "" )
200
+ . build ( ) ;
201
+ p. cargo ( "check" )
202
+ . with_status ( 101 )
203
+ . with_stderr_data ( str![ [ r#"
204
+ [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
205
+
206
+ Caused by:
207
+ unknown cargo feature `build-dir`
208
+
209
+ "# ] ] )
210
+ . run ( ) ;
211
+ }
212
+
213
+ #[ cargo_test]
214
+ fn feature_syntax ( ) {
215
+ let p = project ( )
216
+ . file (
217
+ "Cargo.toml" ,
218
+ r#"
219
+ cargo-features = ["bad_feature"]
220
+
221
+ [package]
222
+ name = "a"
223
+ version = "0.0.1"
224
+ edition = "2015"
225
+ authors = []
226
+ "# ,
227
+ )
228
+ . file ( "src/lib.rs" , "" )
229
+ . build ( ) ;
230
+ p. cargo ( "check" )
231
+ . with_status ( 101 )
232
+ . with_stderr_data ( str![ [ r#"
233
+ [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
234
+
235
+ Caused by:
236
+ unknown cargo feature `bad_feature`
177
237
178
238
"# ] ] )
179
239
. run ( ) ;
You can’t perform that action at this time.
0 commit comments