* Added support for unparseable sections.
* Add write support for unparseable sections.
* Slightly changed test files to make test results clearer with tools/platforms that handle whitespace differently.
I have a config.ini where section names can contain "]", which leads to parse
errors. While proper support for quoting would be best (issue #32) simply
matching the last "]" rather than the first helps in this case.
The alignment length calculation did not take into account that
keys may be added to if they contained "\"", "=", ":", or "`".
This gave an under calculation and resulted in index out of
bounds when this happened to be the longest key.
A common practice in applications development is to allow the user
to customise/extend program's settings by overriding global defaults
set in system-wide config files (typically installed under /etc)
with site-specific copies (e.g. /usr/local/etc) and user-specific
files generally stored in the user's home directory. It must be
noticed that this cascade approach allows the user to specify only
those options that he wishes to override, whilst the other values
will keep their value already set in the other configuration
files. In general, when a program couldn't find any configuration
file rather than crashing it falls back to hardcoded default values.
These changes introduce a new function LooseLoad that allows the
caller to pass a slice of filenames without worrying about their
existence or not. LooseLoad will attempt to load them in order.
If a file doesn't just, it will just be ignored and the function
won't return any error. In case no files existed, an empty
configuration will be returned to the caller.
This functionality is inspired by the Python's standard library
configparser.RawConfigParser.read() function:
https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser.read