summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/20 cups
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/frameworks/20 cups
parentInitial commit. (diff)
downloadmeson-upstream.tar.xz
meson-upstream.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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"]
+}