chiark / gitweb /
conf-parser: accept trailing backslash at the end of the file (#8941)
authorFilipe Brandenburger <filbranden@google.com>
Thu, 10 May 2018 01:10:07 +0000 (18:10 -0700)
committerSven Eden <yamakuzure@gmx.net>
Thu, 28 Jun 2018 07:24:07 +0000 (09:24 +0200)
commit996045a96a16b35cb4eff859ed69d12464f95797
treeac0b94dfd32322972d21733a3d37eccc40e4ae1c
parentf6bdcb639582b5025266fb85465f74ffb7b2cca8
conf-parser: accept trailing backslash at the end of the file (#8941)

This makes it behave the same whether there is a blank line or not at
the end of the file.  This is also consistent with the behavior of the
shell on a shell script that ends on a trailing backslash at the last
line.

Added tests to test_config_parse(), which only pass if the corresponding
change to config_parse() is included.

(cherry picked from commit 4f29e0db127dce9e1a28af4d7bf88c124ba257b7)
src/shared/conf-parser.c
src/test/test-conf-parser.c