From 650023f0ccfe2ff8ed8134ab3b26d50c891b0f74 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 24 Mar 2020 11:54:00 -0700 Subject: unittests: Add test to show that link_language is broken --- run_unittests.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/run_unittests.py b/run_unittests.py index da898a3..35f5f9c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4641,6 +4641,21 @@ recommended as it is not supported on some platforms''') def test_junit_valid_exitcode(self): self._test_junit('44 test args') + def test_link_language_linker(self): + # TODO: there should be some way to query how we're linking things + # without resorting to reading the ninja.build file + if self.backend is not Backend.ninja: + raise unittest.SkipTest('This test reads the ninja file') + + testdir = os.path.join(self.common_test_dir, '230 link language') + self.init(testdir) + + build_ninja = os.path.join(self.builddir, 'build.ninja') + with open(build_ninja, 'r', encoding='utf-8') as f: + contents = f.read() + + self.assertRegex(contents, r'build main(\.exe)?.*: c_LINKER') + class FailureTests(BasePlatformTests): ''' -- cgit v1.1