run_unittests.py: Test that empty cdata subst are actually done
Improved test for https://github.com/mesonbuild/meson/issues/3826
This commit is contained in:
parent
8e84b13850
commit
77d66fec4b
|
@ -2296,6 +2296,10 @@ recommended as it is not supported on some platforms''')
|
|||
# No warnings about empty configuration data objects passed to files with substitutions
|
||||
self.assertNotRegex(out, "WARNING:.*empty configuration_data.*nosubst-nocopy1.txt.in")
|
||||
self.assertNotRegex(out, "WARNING:.*empty configuration_data.*nosubst-nocopy2.txt.in")
|
||||
with open(os.path.join(self.builddir, 'nosubst-nocopy1.txt'), 'rb') as f:
|
||||
self.assertEqual(f.read().strip(), b'/* #undef FOO_BAR */')
|
||||
with open(os.path.join(self.builddir, 'nosubst-nocopy2.txt'), 'rb') as f:
|
||||
self.assertEqual(f.read().strip(), b'')
|
||||
|
||||
|
||||
class FailureTests(BasePlatformTests):
|
||||
|
|
Loading…
Reference in New Issue