Commit graph

4 commits

Author SHA1 Message Date
Richard Hansen
270a82dd58 parse_assignments: Support newlines
Allow newlines to be in values, but stop searching for assignments
once an unescaped/unquoted newline is discovered.  This is preparation
to using `parse_assignments` to process the `--options` command-line
argument, which might have embedded newlines.
2024-08-18 00:41:28 -04:00
Richard Hansen
4c7634855b Move *_env processing to parse_assignment
This makes the behavior transparent to the rest of ddclient, which
will make it possible for a future commit to simplify option
processing.
2024-08-18 00:41:28 -04:00
Richard Hansen
199e9125a4 Use subtest to group related tests
This reduces the output of `make check`, making it easier to zero in
on results of interest.
2020-07-07 13:01:15 -04:00
Richard Hansen
6d7d248f79 Improve parsing of config file assignments
* Ignore empty `key=value` strings in variable assignments. Now the
    following lines are supported with the expected meaning:
      * `a=1 , b=2`
      * `a=1,,b=2`
  * Improve the warning message when there is an unterminated quote.
  * Add a warning if the line ends with a backslash.

Also add unit tests.
2020-07-03 16:56:01 -04:00