[hawkmoth] [PATCH v2 15/15] test: add composition test

  • From: Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx>
  • To: hawkmoth@xxxxxxxxxxxxx
  • Date: Sat, 19 Jan 2019 23:53:33 +0100

While the behaviour shown in this new test is not necessarily ideal, it
serves as a benchmark for the time being.
---
 test/composition.c      | 13 +++++++++++++
 test/composition.stdout | 16 ++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 test/composition.c
 create mode 100644 test/composition.stdout

diff --git a/test/composition.c b/test/composition.c
new file mode 100644
index 0000000..ea388ef
--- /dev/null
+++ b/test/composition.c
@@ -0,0 +1,13 @@
+/** This is a file level comment. */
+
+/** This is a variable. */
+int a;
+
+/** This is another variable. */
+
+int b;
+
+/** This is another file level comment. */
+
+/* This comment breaks the docstr and variable association. */
+int c;
diff --git a/test/composition.stdout b/test/composition.stdout
new file mode 100644
index 0000000..e9faa82
--- /dev/null
+++ b/test/composition.stdout
@@ -0,0 +1,16 @@
+
+This is a file level comment.
+
+
+.. c:var:: int a
+
+   This is a variable.
+
+
+.. c:var:: int b
+
+   This is another variable.
+
+
+This is another file level comment.
+
-- 
2.20.1


Other related posts: