aboutsummaryrefslogtreecommitdiff
path: root/tests/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtures')
-rw-r--r--tests/fixtures/c/directives.c7
-rw-r--r--tests/fixtures/c/inline_ref.c5
-rw-r--r--tests/fixtures/c/multi_chunk.c11
-rw-r--r--tests/fixtures/c/no_comments.c3
-rw-r--r--tests/fixtures/c/ref_string.c6
-rw-r--r--tests/fixtures/c/rst_exec.c8
-rw-r--r--tests/fixtures/c/shared_namespace.c11
-rw-r--r--tests/fixtures/c/simple.c5
-rw-r--r--tests/fixtures/c/src_repo.c5
-rw-r--r--tests/fixtures/c/toc.c5
-rw-r--r--tests/fixtures/lua/simple.lua5
-rw-r--r--tests/fixtures/lua/single_line.lua2
-rw-r--r--tests/fixtures/md/readme.md2
-rw-r--r--tests/fixtures/md/simple.md3
-rw-r--r--tests/fixtures/py/simple.py6
-rw-r--r--tests/fixtures/py/single_line.py2
16 files changed, 86 insertions, 0 deletions
diff --git a/tests/fixtures/c/directives.c b/tests/fixtures/c/directives.c
new file mode 100644
index 0000000..4becc88
--- /dev/null
+++ b/tests/fixtures/c/directives.c
@@ -0,0 +1,7 @@
+/* md
+@name test/directives
+@file generated/source.c
+@ref test/directives-ref
+Directive test body content.
+*/
+void directives_demo() {}
diff --git a/tests/fixtures/c/inline_ref.c b/tests/fixtures/c/inline_ref.c
new file mode 100644
index 0000000..72ef395
--- /dev/null
+++ b/tests/fixtures/c/inline_ref.c
@@ -0,0 +1,5 @@
+/* md
+@name test/inline-ref
+See @lua/Coroutines for details on cooperative multitasking.
+*/
+void inline_ref_func() {}
diff --git a/tests/fixtures/c/multi_chunk.c b/tests/fixtures/c/multi_chunk.c
new file mode 100644
index 0000000..57fd463
--- /dev/null
+++ b/tests/fixtures/c/multi_chunk.c
@@ -0,0 +1,11 @@
+/* md
+@name test/alpha
+First chunk content.
+*/
+void foo() {}
+
+/* md
+@name test/beta
+Second chunk content.
+*/
+void bar() {}
diff --git a/tests/fixtures/c/no_comments.c b/tests/fixtures/c/no_comments.c
new file mode 100644
index 0000000..a667cef
--- /dev/null
+++ b/tests/fixtures/c/no_comments.c
@@ -0,0 +1,3 @@
+/* This is a regular comment, not a doc comment */
+// Another non-doc comment
+int noop() { return 42; }
diff --git a/tests/fixtures/c/ref_string.c b/tests/fixtures/c/ref_string.c
new file mode 100644
index 0000000..711ac20
--- /dev/null
+++ b/tests/fixtures/c/ref_string.c
@@ -0,0 +1,6 @@
+/* md
+@name test/ref-string
+@ref lua/Coroutines
+Return type: {{ ref_string }}
+*/
+void ref_string_func() {}
diff --git a/tests/fixtures/c/rst_exec.c b/tests/fixtures/c/rst_exec.c
new file mode 100644
index 0000000..3aabf9f
--- /dev/null
+++ b/tests/fixtures/c/rst_exec.c
@@ -0,0 +1,8 @@
+/* rst
+@name test/rst-exec
+RST Heading
+===========
+
+This chunk should be rendered by the rst renderer.
+*/
+int noop() { return 0; }
diff --git a/tests/fixtures/c/shared_namespace.c b/tests/fixtures/c/shared_namespace.c
new file mode 100644
index 0000000..25f064a
--- /dev/null
+++ b/tests/fixtures/c/shared_namespace.c
@@ -0,0 +1,11 @@
+/* md
+@name test/shared
+Part one of the shared page.
+*/
+void part_one() {}
+
+/* md
+@name test/shared
+Part two of the shared page.
+*/
+void part_two() {}
diff --git a/tests/fixtures/c/simple.c b/tests/fixtures/c/simple.c
new file mode 100644
index 0000000..2595929
--- /dev/null
+++ b/tests/fixtures/c/simple.c
@@ -0,0 +1,5 @@
+/* md
+@name test/simple
+Hello from a C comment.
+*/
+int main() { return 0; }
diff --git a/tests/fixtures/c/src_repo.c b/tests/fixtures/c/src_repo.c
new file mode 100644
index 0000000..fb0d8b6
--- /dev/null
+++ b/tests/fixtures/c/src_repo.c
@@ -0,0 +1,5 @@
+/* md
+@name test/src-repo
+Generated from {{ src_repo }}/src.c
+*/
+void src_repo_func() {}
diff --git a/tests/fixtures/c/toc.c b/tests/fixtures/c/toc.c
new file mode 100644
index 0000000..bb0782b
--- /dev/null
+++ b/tests/fixtures/c/toc.c
@@ -0,0 +1,5 @@
+/* md
+@name test/toc-chunk
+Navigation: {{ toc }}
+*/
+void toc_func() {}
diff --git a/tests/fixtures/lua/simple.lua b/tests/fixtures/lua/simple.lua
new file mode 100644
index 0000000..de527a9
--- /dev/null
+++ b/tests/fixtures/lua/simple.lua
@@ -0,0 +1,5 @@
+--[[ md
+@name test/lua-simple
+Hello from a Lua comment.
+]]
+local x = 1
diff --git a/tests/fixtures/lua/single_line.lua b/tests/fixtures/lua/single_line.lua
new file mode 100644
index 0000000..f541825
--- /dev/null
+++ b/tests/fixtures/lua/single_line.lua
@@ -0,0 +1,2 @@
+--[[ md This comment opens and closes on one line — no chunk. ]]
+local x = 1
diff --git a/tests/fixtures/md/readme.md b/tests/fixtures/md/readme.md
new file mode 100644
index 0000000..5833cab
--- /dev/null
+++ b/tests/fixtures/md/readme.md
@@ -0,0 +1,2 @@
+# Project Overview
+Hello from the readme.
diff --git a/tests/fixtures/md/simple.md b/tests/fixtures/md/simple.md
new file mode 100644
index 0000000..494ade7
--- /dev/null
+++ b/tests/fixtures/md/simple.md
@@ -0,0 +1,3 @@
+@name test/md-simple
+# Markdown Page
+Hello from a markdown file.
diff --git a/tests/fixtures/py/simple.py b/tests/fixtures/py/simple.py
new file mode 100644
index 0000000..b8e2ce9
--- /dev/null
+++ b/tests/fixtures/py/simple.py
@@ -0,0 +1,6 @@
+'''md
+@name test/py-simple
+Hello from a Python doc comment.
+'''
+def noop():
+ pass
diff --git a/tests/fixtures/py/single_line.py b/tests/fixtures/py/single_line.py
new file mode 100644
index 0000000..baafa10
--- /dev/null
+++ b/tests/fixtures/py/single_line.py
@@ -0,0 +1,2 @@
+'''This comment opens and closes on one line — no chunk.'''
+x = 1