aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-06 18:57:40 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-03-06 19:41:21 -0500
commit0f2f87a003477bd79487a47d5f60f67751e2f44e (patch)
tree6ab93b568a66d25cffa9a6ae51e3b505d75a7001 /test cases
parent8b573d7dc65bf20fcb0377ce4c56841496ad0c69 (diff)
downloadmeson-0f2f87a003477bd79487a47d5f60f67751e2f44e.zip
meson-0f2f87a003477bd79487a47d5f60f67751e2f44e.tar.gz
meson-0f2f87a003477bd79487a47d5f60f67751e2f44e.tar.bz2
find_program: add a version() method to match the one for dependencies
It is often useful to check the found version of a program without checking whether you can successfully find `find_program('foo', required: false, version: '>=XXX')`
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/26 find program/meson.build3
1 files changed, 3 insertions, 0 deletions
diff --git a/test cases/common/26 find program/meson.build b/test cases/common/26 find program/meson.build
index 3b59caa..a083d69 100644
--- a/test cases/common/26 find program/meson.build
+++ b/test cases/common/26 find program/meson.build
@@ -25,6 +25,9 @@ assert(not prog.found(), 'Version should be too old')
prog = find_program('print-version.py', version : '>=1.0')
assert(prog.found(), 'Program version should match')
+prog = find_program('print-version.py')
+assert(prog.version() == '1.0', 'Program version should be detectable')
+
prog = find_program('print-version-with-prefix.py', version : '>=1.0')
assert(prog.found(), 'Program version should match')