Skip to content

Commit 4c7be8d

Browse files
committed
Add a test reproducing the issue
1 parent fede83c commit 4c7be8d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/testsuite/config.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Tests for config settings.
22
3+
use cargo::core::profiles::Strip;
34
use cargo::core::{enable_nightly_features, Shell};
45
use cargo::util::config::{self, Config, SslVersionConfig, StringList};
56
use 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+
}

0 commit comments

Comments
 (0)