aboutsummaryrefslogtreecommitdiff
path: root/tests/fixtures/c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtures/c')
-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
10 files changed, 66 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() {}