unittests: Add test to show that link_language is broken
@@ -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):
'''
