summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/html/basic-table.html35
-rw-r--r--tests/suite/layout/grid/html.typ32
2 files changed, 67 insertions, 0 deletions
diff --git a/tests/ref/html/basic-table.html b/tests/ref/html/basic-table.html
new file mode 100644
index 00000000..6ba1864e
--- /dev/null
+++ b/tests/ref/html/basic-table.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body>
+ <table>
+ <thead>
+ <tr>
+ <th>The</th><th>first</th><th>and</th>
+ </tr>
+ <tr>
+ <th>the</th><th>second</th><th>row</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Foo</td><td rowspan="2">Baz</td><td>Bar</td>
+ </tr>
+ <tr>
+ <td>1</td><td>2</td>
+ </tr>
+ <tr>
+ <td colspan="2">3</td><td>4</td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td>The</td><td>last</td><td>row</td>
+ </tr>
+ </tfoot>
+ </table>
+ </body>
+</html>
diff --git a/tests/suite/layout/grid/html.typ b/tests/suite/layout/grid/html.typ
new file mode 100644
index 00000000..2a7dfc2c
--- /dev/null
+++ b/tests/suite/layout/grid/html.typ
@@ -0,0 +1,32 @@
+--- basic-table html ---
+#table(
+ columns: 3,
+ rows: 3,
+
+ table.header(
+ [The],
+ [first],
+ [and],
+ [the],
+ [second],
+ [row],
+ table.hline(stroke: red)
+ ),
+
+ table.cell(x: 1, rowspan: 2)[Baz],
+ [Foo],
+ [Bar],
+
+ [1],
+ // Baz spans into the next cell
+ [2],
+
+ table.cell(colspan: 2)[3],
+ [4],
+
+ table.footer(
+ [The],
+ [last],
+ [row],
+ ),
+)