tests/curses: Extend to test versions

This is mostly important for the system dependency where we need to roll
the version check ourselves.
This commit is contained in:
Dylan Baker 2020-09-18 10:51:37 -07:00
parent 5aee8567b8
commit 19f2b3d583
1 changed files with 5 additions and 1 deletions

View File

@ -1,9 +1,13 @@
project('curses', 'c')
curses = dependency('curses', required: false, method : get_option('method'))
curses = dependency('curses', required: false, method : get_option('method'), version : '>= 0')
if not curses.found()
error('MESON_SKIP_TEST: Curses library not found')
endif
exec = executable('basic', 'main.c', dependencies: curses)
# didn't run the test because in general graphics fail on CI
# this should fail
not_found = dependency('curses', required: false, method : get_option('method'), version : '> 1000000')
assert(not_found.found() == false)