aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorPaulo Neves <ptsneves@gmail.com>2019-11-12 12:52:42 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-11-13 22:04:15 +0200
commit07389e23bc225adb9f9462e2fec1272ee24062e9 (patch)
tree425b7ed0da0de8e008a487b987ca92f31813facc /run_unittests.py
parent2a73517e0808dbedb561f9670401d18309893eb0 (diff)
downloadmeson-07389e23bc225adb9f9462e2fec1272ee24062e9.zip
meson-07389e23bc225adb9f9462e2fec1272ee24062e9.tar.gz
meson-07389e23bc225adb9f9462e2fec1272ee24062e9.tar.bz2
coredata: CmdLineFileParser no longer interpolates strings.
Previously if a user tried to pass a command line build option that contained a '%' character the command line parser assumed that there was string interpolation to be done. As there is no sense in such a scenario no code provides any input for the interpolation. This then leads to a failure. In this commit we specifically override the defaults in ConfigParser and set interpolation to None, which disables command line build option interpolation. Fixes #6157
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 1105a8f..a97aac6 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3382,6 +3382,11 @@ recommended as it is not supported on some platforms''')
self.assertEqual(obj.compiler_options.host['c_args'].value, ['foo bar', 'one', 'two'])
self.wipe()
+ self.init(testdir, extra_args=['-Dset_percent_opt=myoption%'])
+ obj = mesonbuild.coredata.load(self.builddir)
+ self.assertEqual(obj.user_options['set_percent_opt'].value, 'myoption%')
+ self.wipe()
+
# Setting a 2nd time the same option should override the first value
try:
self.init(testdir, extra_args=['--bindir=foo', '--bindir=bar',