run_unittests.py: Test that empty cdata subst are actually done

Improved test for https://github.com/mesonbuild/meson/issues/3826
pull/3843/merge
Nirbheek Chauhan 6 years ago committed by Nirbheek Chauhan
parent 8e84b13850
commit 77d66fec4b
  1. 4
      run_unittests.py

@ -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…
Cancel
Save