Merge pull request #243 from dax/fix-config-long-value-with-default-value

Fix config value followed by "Default value"
This commit is contained in:
Dheepak Krishnamurthy 2021-07-07 11:14:55 -06:00 committed by GitHub
commit 0c72c2085d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -335,7 +335,7 @@ impl Config {
}
}
} else {
if !line.starts_with(' ') {
if !line.starts_with(" ") {
return Some(config_lines.join(" "));
}
@ -648,6 +648,15 @@ mod tests {
assert_eq!(config.unwrap(), "filter and test");
}
#[test]
fn test_get_config_long_value_followed_by_default_value() {
let config = Config::get_config(
"report.test.filter",
"report.test.description test\nreport.test.filter filter and\n test\n Default value test",
);
assert_eq!(config.unwrap(), "filter and test");
}
#[test]
fn test_get_config_last_long_value() {
let config = Config::get_config(