Bug 23533 - Accept '=' in ini property values
authorDodji Seketeli <dodji@redhat.com>
Thu, 30 Aug 2018 08:54:33 +0000 (10:54 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 30 Aug 2018 08:54:33 +0000 (10:54 +0200)
commit98f972dc1d96e89b901c358d43b1f675f89d2b71
tree3c6b0618ce98c10e46a6721adc20f211d353186f
parenta6e65323529e5595ba58ffb56037410a9ab06c18
Bug 23533 - Accept '=' in ini property values

It appears that it's not possible to write a suppression specification
like the below at the moment:

  [suppress_file]
  label = Libabigail can't handle libgfortran.so (https://sourceware.org/bugzilla/show_bug.cgi?id=23492)
  file_name_regexp = libgfortran\\.so.*

This is because the ini parser won't accept the '=' character in the
URL as a valid character for ini property values.

So the entire [suppress_file] section is ignored by the suppression
specification engine.

This patch fixes that by making the equal character valid in property
values.

* src/abg-ini.cc (char_is_delimiter): Take a new include_equal
flag to control is the equal character should be considered as a
delimiter or not.
(char_is_property_value_char): Accept the equal character as a
valid property value character.
* tests/Makefile.am: Build a new runtestini test from the new
tests/test-ini.cc source file.
* tests/data/Makefile.am: Add the two new test inputs below to
source distribution.
* tests/data/test-ini/test01-equal-in-property-string.{abignore,
abignore.expected}: New test inputs.
* tests/test-ini.cc: New test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-ini.cc
tests/Makefile.am
tests/data/Makefile.am
tests/data/test-ini/test01-equal-in-property-string.abignore [new file with mode: 0644]
tests/data/test-ini/test01-equal-in-property-string.abignore.expected [new file with mode: 0644]
tests/test-ini.cc [new file with mode: 0644]