Fix config value followed by "Default value"

This commit is contained in:
David Rousselie 2021-07-05 14:04:47 +02:00
parent 63d12101f6
commit 848fd0352b
No known key found for this signature in database
GPG key ID: 8ACE0E796D6D2B9B

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(