Extend unit test to cover cwd-relative warning location formatting

pull/6627/head
Jon Turney 5 years ago
parent c8f8d58273
commit a8cd01af42
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 14
      run_unittests.py

@ -3172,6 +3172,20 @@ int main(int argc, char **argv) {
]:
self.assertRegex(out, re.escape(expected))
for wd in [
self.src_root,
self.builddir,
os.getcwd(),
]:
self.new_builddir()
out = self.init(tdir, workdir=wd)
expected = os.path.join(relpath(tdir, self.src_root), 'meson.build')
relwd = relpath(self.src_root, wd)
if relwd != '.':
expected = os.path.join(relwd, expected)
expected = '\n' + expected + ':'
self.assertIn(expected, out)
def test_error_location_path(self):
'''Test locations in meson errors contain correct paths'''
# this list contains errors from all the different steps in the

Loading…
Cancel
Save