aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-09-02 11:04:19 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-09-30 12:26:19 -0400
commitd2fa6d50809e6a5955999152f43a461595c6bc4c (patch)
treefa5910692858d2b6c7371a8b0fbee87bd97e6f31 /unittests
parente58b3adc7044980bbddca1ad9674ac7b0c5bac0a (diff)
downloadmeson-d2fa6d50809e6a5955999152f43a461595c6bc4c.zip
meson-d2fa6d50809e6a5955999152f43a461595c6bc4c.tar.gz
meson-d2fa6d50809e6a5955999152f43a461595c6bc4c.tar.bz2
Make custom_target() name argument optional
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index e6ddab3..b8cdfb6 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -4061,3 +4061,11 @@ class AllPlatformTests(BasePlatformTests):
with self.assertRaises(subprocess.CalledProcessError) as cm:
self.build()
self.assertIn('error: use of a blacklisted/placeholder name `foo`', cm.exception.stdout)
+
+ def test_custom_target_name(self):
+ testdir = os.path.join(self.unit_test_dir, '99 custom target name')
+ self.init(testdir)
+ out = self.build()
+ if self.backend is Backend.ninja:
+ self.assertIn('Generating file.txt with a custom command', out)
+ self.assertIn('Generating subdir/file.txt with a custom command', out)