Fossil SCM
If the setting is long enough to fill in the format specifier---like the email-send-relayhost setting---there will be no whitespace after it unless it has a value set, so make the regex handle this particular state better.
Commit
a8656f580f04af93aa52487aed2a59100e8fa8682f485842da57f9ec60ae8f43
Parent
72e71e904d0067d…
1 file changed
+1
-1
+1
-1
| --- test/settings.test | ||
| +++ test/settings.test | ||
| @@ -39,11 +39,11 @@ | ||
| 39 | 39 | # |
| 40 | 40 | proc extract_setting_names { data } { |
| 41 | 41 | set names [list] |
| 42 | 42 | |
| 43 | 43 | foreach {dummy name} [regexp \ |
| 44 | - -all -line -inline -- {^([a-z][a-z0-9\-]*) } $data] { | |
| 44 | + -all -line -inline -- {^([a-z][a-z0-9\-]*) ?.*$} $data] { | |
| 45 | 45 | lappend names $name |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | return $names |
| 49 | 49 | } |
| 50 | 50 |
| --- test/settings.test | |
| +++ test/settings.test | |
| @@ -39,11 +39,11 @@ | |
| 39 | # |
| 40 | proc extract_setting_names { data } { |
| 41 | set names [list] |
| 42 | |
| 43 | foreach {dummy name} [regexp \ |
| 44 | -all -line -inline -- {^([a-z][a-z0-9\-]*) } $data] { |
| 45 | lappend names $name |
| 46 | } |
| 47 | |
| 48 | return $names |
| 49 | } |
| 50 |
| --- test/settings.test | |
| +++ test/settings.test | |
| @@ -39,11 +39,11 @@ | |
| 39 | # |
| 40 | proc extract_setting_names { data } { |
| 41 | set names [list] |
| 42 | |
| 43 | foreach {dummy name} [regexp \ |
| 44 | -all -line -inline -- {^([a-z][a-z0-9\-]*) ?.*$} $data] { |
| 45 | lappend names $name |
| 46 | } |
| 47 | |
| 48 | return $names |
| 49 | } |
| 50 |