aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
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):