diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-03 23:31:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-03 23:31:32 +0300 |
commit | 8b73d807924dde250f1c4340885ef46a22b82ba7 (patch) | |
tree | e9c2ba1b19e115858a18ce9d9f20f094d817b02c /run_unittests.py | |
parent | 3070461ecccc582eed186fa215a4c4dd36823d71 (diff) | |
parent | 1b81b32afbe516f9230393cd5706de692531e10c (diff) | |
download | meson-8b73d807924dde250f1c4340885ef46a22b82ba7.zip meson-8b73d807924dde250f1c4340885ef46a22b82ba7.tar.gz meson-8b73d807924dde250f1c4340885ef46a22b82ba7.tar.bz2 |
Merge pull request #1457 from mesonbuild/overrides
Add MVP implementation of overriding options.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index be73839..0656f88 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1328,6 +1328,27 @@ class LinuxlikeTests(BasePlatformTests): # The chown failed nonfatally if we're not root self.assertEqual(0, statf.st_uid) + def test_cpp_std_override(self): + testdir = os.path.join(self.unit_test_dir, '6 std override') + self.init(testdir) + compdb = self.get_compdb() + for i in compdb: + if 'prog03' in i['file']: + c03_comp = i['command'] + if 'prog11' in i['file']: + c11_comp = i['command'] + if 'progp' in i['file']: + plain_comp = i['command'] + self.assertNotEqual(len(plain_comp), 0) + self.assertIn('-std=c++03', c03_comp) + self.assertNotIn('-std=c++11', c03_comp) + self.assertIn('-std=c++11', c11_comp) + self.assertNotIn('-std=c++03', c11_comp) + self.assertNotIn('-std=c++03', plain_comp) + self.assertNotIn('-std=c++11', plain_comp) + # Now werror + self.assertIn('-Werror', plain_comp) + self.assertNotIn('-Werror', c03_comp) class RewriterTests(unittest.TestCase): |