aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/frameworks/31 curses
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/frameworks/31 curses
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/frameworks/31 curses')
-rw-r--r--meson/test cases/frameworks/31 curses/main.c7
-rw-r--r--meson/test cases/frameworks/31 curses/meson.build13
-rw-r--r--meson/test cases/frameworks/31 curses/meson_options.txt6
-rw-r--r--meson/test cases/frameworks/31 curses/test.json11
4 files changed, 37 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/31 curses/main.c b/meson/test cases/frameworks/31 curses/main.c
new file mode 100644
index 000000000..07d73f533
--- /dev/null
+++ b/meson/test cases/frameworks/31 curses/main.c
@@ -0,0 +1,7 @@
+#include "curses.h"
+
+int main(void) {
+initscr();
+endwin();
+return 0;
+} \ No newline at end of file
diff --git a/meson/test cases/frameworks/31 curses/meson.build b/meson/test cases/frameworks/31 curses/meson.build
new file mode 100644
index 000000000..796a0d8b6
--- /dev/null
+++ b/meson/test cases/frameworks/31 curses/meson.build
@@ -0,0 +1,13 @@
+project('curses', 'c')
+
+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)
diff --git a/meson/test cases/frameworks/31 curses/meson_options.txt b/meson/test cases/frameworks/31 curses/meson_options.txt
new file mode 100644
index 000000000..e294e8390
--- /dev/null
+++ b/meson/test cases/frameworks/31 curses/meson_options.txt
@@ -0,0 +1,6 @@
+option(
+ 'method',
+ type : 'combo',
+ choices : ['pkg-config', 'config-tool', 'system'],
+ value : 'pkg-config',
+)
diff --git a/meson/test cases/frameworks/31 curses/test.json b/meson/test cases/frameworks/31 curses/test.json
new file mode 100644
index 000000000..39956952f
--- /dev/null
+++ b/meson/test cases/frameworks/31 curses/test.json
@@ -0,0 +1,11 @@
+{
+ "matrix": {
+ "options": {
+ "method": [
+ { "val": "pkg-config" },
+ { "val": "config-tool" },
+ { "val": "system" }
+ ]
+ }
+ }
+}