File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
//! Tests for config settings.
2
2
3
+ use cargo:: core:: profiles:: Strip ;
3
4
use cargo:: core:: { enable_nightly_features, Shell } ;
4
5
use cargo:: util:: config:: { self , Config , SslVersionConfig , StringList } ;
5
6
use cargo:: util:: interning:: InternedString ;
@@ -1259,3 +1260,19 @@ fn string_list_advanced_env() {
1259
1260
"error in environment variable `CARGO_KEY3`: expected string, found integer" ,
1260
1261
) ;
1261
1262
}
1263
+
1264
+ #[ cargo_test]
1265
+ fn parse_enum ( ) {
1266
+ write_config (
1267
+ "\
1268
+ [profile.release]
1269
+ strip = 'debuginfo'
1270
+ " ,
1271
+ ) ;
1272
+
1273
+ let config = new_config ( ) ;
1274
+
1275
+ let p: toml:: TomlProfile = config. get ( "profile.release" ) . unwrap ( ) ;
1276
+ let strip = p. strip . unwrap ( ) ;
1277
+ assert_eq ! ( strip, Strip :: DebugInfo ) ;
1278
+ }
You can’t perform that action at this time.
0 commit comments