Martin Willi
74e14ea547
unit-tests: Adapt settings tests for Windows
2014-06-04 15:53:09 +02:00
Tobias Brunner
7c888e0d23
unit-tests: Don't assert failures for unreadable settings files as root
...
The file can still be read by root even if nobody has read privileges.
2014-05-16 17:50:29 +02:00
Tobias Brunner
8b43c9ba34
settings: Adopt the new order of sections and settings when replacing configs
2014-05-15 11:28:09 +02:00
Tobias Brunner
5ac20cbb87
settings: Only purge sections if necessary
...
Instead of removing and caching all values of a previous config, we only
do this for actually removed sections/settings.
2014-05-15 11:28:08 +02:00
Tobias Brunner
f5dd274ab8
settings: Maintain order of sections and settings while enumerating
2014-05-15 11:28:08 +02:00
Tobias Brunner
2fbbea55c5
settings: Don't overwrite values in-place
...
This is not thread safe. If threads are reading from pointers to existing
values they could get a partially updated invalid value.
Refactored assignment to a separate function.
2014-05-15 11:28:08 +02:00
Tobias Brunner
2fe04fb312
unit-tests: Update settings tests to match new parser
...
Empty settings are now ignored, strings are supported, newlines are
handled properly (e.g. at the end of files) etc.
2014-05-15 11:28:07 +02:00
Tobias Brunner
b9b1114ab1
settings: Move to a separate folder
2014-05-15 11:28:05 +02:00
Tobias Brunner
9925eeabd2
settings: Add support to enumerate sections and key/value pairs with fallbacks
2014-02-12 14:34:33 +01:00
Tobias Brunner
dbed07782b
unit-tests: Test how settings_t handles some invalid data
2014-02-12 14:34:32 +01:00
Tobias Brunner
1713d88278
settings: Add method that allows to define fallback sections for other sections
...
The fallbacks are currently only used for single value lookups.
Enumerators are not affected by them.
2014-02-12 14:34:32 +01:00
Tobias Brunner
24d2bb7793
unit-tests: Add tests for includes and file loading in settings_t
2014-02-12 14:34:32 +01:00
Tobias Brunner
25ee33ba65
settings: Allow empty strings in section key
2014-02-12 14:34:32 +01:00
Tobias Brunner
9f9a6b0681
unit-tests: Add tests for enumerators in settings_t
2014-02-12 14:34:32 +01:00
Tobias Brunner
cd0523e0a4
unit-tests: Add tests for setters in settings_t
2014-02-12 14:34:31 +01:00
Tobias Brunner
9f2870216d
unit-tests: Add basic tests for settings_t
2014-02-12 14:34:31 +01:00