mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
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:
commit
0c72c2085d
1 changed files with 10 additions and 1 deletions
|
@ -335,7 +335,7 @@ impl Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if !line.starts_with(' ') {
|
if !line.starts_with(" ") {
|
||||||
return Some(config_lines.join(" "));
|
return Some(config_lines.join(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,6 +648,15 @@ mod tests {
|
||||||
assert_eq!(config.unwrap(), "filter and test");
|
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]
|
#[test]
|
||||||
fn test_get_config_last_long_value() {
|
fn test_get_config_last_long_value() {
|
||||||
let config = Config::get_config(
|
let config = Config::get_config(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue