summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/20 cups
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/frameworks/20 cups')
-rw-r--r--test cases/frameworks/20 cups/cups_prog.c8
-rw-r--r--test cases/frameworks/20 cups/meson.build21
-rw-r--r--test cases/frameworks/20 cups/test.json3
3 files changed, 32 insertions, 0 deletions
diff --git a/test cases/frameworks/20 cups/cups_prog.c b/test cases/frameworks/20 cups/cups_prog.c
new file mode 100644
index 0000000..d6b6dcc
--- /dev/null
+++ b/test cases/frameworks/20 cups/cups_prog.c
@@ -0,0 +1,8 @@
+#include <cups/cups.h>
+
+int
+main()
+{
+ cupsGetDefault();
+ return 0;
+}
diff --git a/test cases/frameworks/20 cups/meson.build b/test cases/frameworks/20 cups/meson.build
new file mode 100644
index 0000000..c533980
--- /dev/null
+++ b/test cases/frameworks/20 cups/meson.build
@@ -0,0 +1,21 @@
+project('cups test', 'c')
+
+cups_dep = dependency('cups', version : '>=1.4', required: false)
+
+if not cups_dep.found()
+ error('MESON_SKIP_TEST cups not found.')
+endif
+
+e = executable('cups_prog', 'cups_prog.c', dependencies : cups_dep)
+
+test('cupstest', e)
+
+# ensure we can find the cups dependency via the legacy and modern config-tool
+# options
+depCC = dependency('cups', version : '>=1.4', method : 'cups-config')
+depCT = dependency('cups', version : '>=1.4', method : 'config-tool')
+depCM = dependency('cups', version : '>=1.4', method : 'cmake')
+
+# check we can apply a version constraint
+dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'pkg-config', required: false)
+dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'config-tool')
diff --git a/test cases/frameworks/20 cups/test.json b/test cases/frameworks/20 cups/test.json
new file mode 100644
index 0000000..8ee026a
--- /dev/null
+++ b/test cases/frameworks/20 cups/test.json
@@ -0,0 +1,3 @@
+{
+ "skip_on_jobname": ["azure", "cygwin", "msys2"]
+}