aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-01-22 17:04:43 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-22 17:04:43 +0100
commit027c3c9ac7d7003f816465cc76278dda17f4dd86 (patch)
treed4bc41ba9dbec74b9466ee71fb3ffa9d8b117ca6 /run_unittests.py
parentb7c6f3ec72c831c2af20eb5320d5f51b52d79227 (diff)
downloadmeson-027c3c9ac7d7003f816465cc76278dda17f4dd86.zip
meson-027c3c9ac7d7003f816465cc76278dda17f4dd86.tar.gz
meson-027c3c9ac7d7003f816465cc76278dda17f4dd86.tar.bz2
Added subdir test
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index c8d7f7a..711621b 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5013,6 +5013,22 @@ class RewriterTests(BasePlatformTests):
out = self.extract_test_data(out)
self.assertDictEqual(out, expected)
+ def test_target_subdir(self):
+ self.prime('2 subdirs')
+ out = self.rewrite(self.builddir, os.path.join(self.builddir, 'addSrc.json'))
+ out = self.extract_test_data(out)
+ expected = {
+ 'target': {
+ 'd3a7449@@something@exe': {'name': 'something', 'sources': ['first.c', 'second.c', 'third.c']}
+ }
+ }
+ self.assertDictEqual(out, expected)
+
+ # Check the written file
+ out = self.rewrite(self.builddir, os.path.join(self.builddir, 'info.json'))
+ out = self.extract_test_data(out)
+ self.assertDictEqual(out, expected)
+
class NativeFileTests(BasePlatformTests):
def setUp(self):