Add a test case for location in duplicate kwarg warning

pull/2852/head
Jon Turney 7 years ago
parent 3c75ae9ced
commit dd1de073f4
  1. 6
      run_unittests.py
  2. 0
      test cases/unit/20 warning location/a.c
  3. 0
      test cases/unit/20 warning location/b.c
  4. 0
      test cases/unit/20 warning location/main.c
  5. 5
      test cases/unit/20 warning location/meson.build
  6. 0
      test cases/unit/20 warning location/sub/c.c
  7. 0
      test cases/unit/20 warning location/sub/d.c
  8. 3
      test cases/unit/20 warning location/sub/meson.build
  9. 0
      test cases/unit/20 warning location/sub/sub.c

@ -1707,6 +1707,12 @@ int main(int argc, char **argv) {
self.init(workdir)
self.build()
def test_warning_location(self):
tdir = os.path.join(self.unit_test_dir, '20 warning location')
out = self.init(tdir)
self.assertRegex(out, r'WARNING: Keyword argument "link_with" defined multiple times in file meson.build, line 4')
self.assertRegex(out, r'WARNING: Keyword argument "link_with" defined multiple times in file sub' + re.escape(os.path.sep) + r'meson.build, line 3')
class FailureTests(BasePlatformTests):
'''

@ -0,0 +1,5 @@
project('duplicate kwarg', 'c')
a = library('liba', 'a.c')
b = library('libb', 'b.c')
executable('main', 'main.c', link_with: a, link_with: b)
subdir('sub')

@ -0,0 +1,3 @@
c = library('libc', 'c.c')
d = library('libd', 'd.c')
executable('sub', 'sub.c', link_with: c, link_with: d)
Loading…
Cancel
Save