summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/23 hotdoc
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/23 hotdoc
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.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/23 hotdoc')
-rw-r--r--test cases/frameworks/23 hotdoc/doc/index.md1
-rw-r--r--test cases/frameworks/23 hotdoc/doc/meson.build19
-rw-r--r--test cases/frameworks/23 hotdoc/doc/sitemap.txt2
-rw-r--r--test cases/frameworks/23 hotdoc/meson.build14
-rw-r--r--test cases/frameworks/23 hotdoc/test.json9
5 files changed, 45 insertions, 0 deletions
diff --git a/test cases/frameworks/23 hotdoc/doc/index.md b/test cases/frameworks/23 hotdoc/doc/index.md
new file mode 100644
index 0000000..ea5eeb1
--- /dev/null
+++ b/test cases/frameworks/23 hotdoc/doc/index.md
@@ -0,0 +1 @@
+# Hello world!
diff --git a/test cases/frameworks/23 hotdoc/doc/meson.build b/test cases/frameworks/23 hotdoc/doc/meson.build
new file mode 100644
index 0000000..a09bff0
--- /dev/null
+++ b/test cases/frameworks/23 hotdoc/doc/meson.build
@@ -0,0 +1,19 @@
+hotdoc = import('hotdoc')
+
+target = hotdoc.generate_doc(
+ 'foobar',
+ c_smart_index: true,
+ project_version: '0.1',
+ sitemap: 'sitemap.txt',
+ index: 'index.md',
+ c_sources: files('../../10 gtk-doc/include/foo.h'),
+ languages: ['c'],
+ install: true,
+)
+
+assert(target.config_path() == target.full_path() + '.json',
+ 'Hotdoc config paths do not match.'
+)
+
+assert(hotdoc.has_extensions('search') == true,
+ 'Extension "search" provided by hotdoc core should always be found')
diff --git a/test cases/frameworks/23 hotdoc/doc/sitemap.txt b/test cases/frameworks/23 hotdoc/doc/sitemap.txt
new file mode 100644
index 0000000..ba96be1
--- /dev/null
+++ b/test cases/frameworks/23 hotdoc/doc/sitemap.txt
@@ -0,0 +1,2 @@
+index.md
+ c-index
diff --git a/test cases/frameworks/23 hotdoc/meson.build b/test cases/frameworks/23 hotdoc/meson.build
new file mode 100644
index 0000000..64cd6da
--- /dev/null
+++ b/test cases/frameworks/23 hotdoc/meson.build
@@ -0,0 +1,14 @@
+project('hotdoc', 'c')
+
+hotdoc = find_program('hotdoc', required: false)
+if not hotdoc.found()
+ error('MESON_SKIP_TEST hotdoc not found.')
+endif
+
+subdir('doc')
+
+assert(hotdoc.has_extensions(['gi-extension']) == true,
+ 'GI extension should always be found.')
+
+assert(hotdoc.has_extensions(['gi-extension', 'no-way-you-exist-extension']) == false,
+ 'A hotdoc extension called "no-way-you-exist-extension" should never be found.')
diff --git a/test cases/frameworks/23 hotdoc/test.json b/test cases/frameworks/23 hotdoc/test.json
new file mode 100644
index 0000000..e13971e
--- /dev/null
+++ b/test cases/frameworks/23 hotdoc/test.json
@@ -0,0 +1,9 @@
+{
+ "installed": [
+ {"type": "dir", "file": "usr/share/doc/foobar/html"}
+ ],
+ "tools": {
+ "hotdoc": ">=0.1.0"
+ },
+ "skip_on_jobname": ["msys2"]
+}