aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-02-20 19:24:34 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-02-28 11:54:08 +0000
commita8cd01af42a0e114e5184c845aa2cd6dd3eaeac0 (patch)
treefd3d7ec3653bf43905c98c004e3d5c34593999ba
parentc8f8d58273a40d94c820dccab54a7ae2d948cb8a (diff)
downloadmeson-a8cd01af42a0e114e5184c845aa2cd6dd3eaeac0.zip
meson-a8cd01af42a0e114e5184c845aa2cd6dd3eaeac0.tar.gz
meson-a8cd01af42a0e114e5184c845aa2cd6dd3eaeac0.tar.bz2
Extend unit test to cover cwd-relative warning location formatting
-rwxr-xr-xrun_unittests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 2e32b51..d091cbc 100755
--- a/run_unittests.py
+++ b/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