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 11//! Tests for config settings.
22
3+ use cargo:: core:: profiles:: Strip ;
34use cargo:: core:: { enable_nightly_features, Shell } ;
45use cargo:: util:: config:: { self , Config , SslVersionConfig , StringList } ;
56use cargo:: util:: interning:: InternedString ;
@@ -1259,3 +1260,19 @@ fn string_list_advanced_env() {
12591260 "error in environment variable `CARGO_KEY3`: expected string, found integer" ,
12601261 ) ;
12611262}
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