diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2026-07-21 20:19:46 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2026-07-21 20:19:46 -0500 |
| commit | 657fb0007f39f07cc0401e0c5d03e25df6234aa4 (patch) | |
| tree | f73fe23232dc80802f39caed738c38464a60ec6d /tests/fixtures | |
| download | trbldoc-657fb0007f39f07cc0401e0c5d03e25df6234aa4.tar.gz trbldoc-657fb0007f39f07cc0401e0c5d03e25df6234aa4.tar.bz2 trbldoc-657fb0007f39f07cc0401e0c5d03e25df6234aa4.zip | |
Inital commit.
Diffstat (limited to 'tests/fixtures')
| -rw-r--r-- | tests/fixtures/c/directives.c | 7 | ||||
| -rw-r--r-- | tests/fixtures/c/inline_ref.c | 5 | ||||
| -rw-r--r-- | tests/fixtures/c/multi_chunk.c | 11 | ||||
| -rw-r--r-- | tests/fixtures/c/no_comments.c | 3 | ||||
| -rw-r--r-- | tests/fixtures/c/ref_string.c | 6 | ||||
| -rw-r--r-- | tests/fixtures/c/rst_exec.c | 8 | ||||
| -rw-r--r-- | tests/fixtures/c/shared_namespace.c | 11 | ||||
| -rw-r--r-- | tests/fixtures/c/simple.c | 5 | ||||
| -rw-r--r-- | tests/fixtures/c/src_repo.c | 5 | ||||
| -rw-r--r-- | tests/fixtures/c/toc.c | 5 | ||||
| -rw-r--r-- | tests/fixtures/lua/simple.lua | 5 | ||||
| -rw-r--r-- | tests/fixtures/lua/single_line.lua | 2 | ||||
| -rw-r--r-- | tests/fixtures/md/readme.md | 2 | ||||
| -rw-r--r-- | tests/fixtures/md/simple.md | 3 | ||||
| -rw-r--r-- | tests/fixtures/py/simple.py | 6 | ||||
| -rw-r--r-- | tests/fixtures/py/single_line.py | 2 |
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 |
