From f4794d516ffa194dcf2fe4af9e4cd2ace2c30f65 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Wed, 9 Oct 2019 05:40:00 +0800 Subject: [PATCH] [test-report-html] add tests for html-table-cell row/col modifiers --- .../report-system/test/test-report-html.scm | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnucash/report/report-system/test/test-report-html.scm b/gnucash/report/report-system/test/test-report-html.scm index e4178e316c..6c5a3e6375 100644 --- a/gnucash/report/report-system/test/test-report-html.scm +++ b/gnucash/report/report-system/test/test-report-html.scm @@ -798,6 +798,40 @@ HTML Document Title\n\ ) (test-end "HTML Table - Table Rendering") + (test-begin "html-table arbitrary row/col modification") + (let ((doc (gnc:make-html-document)) + (table (gnc:make-html-table))) + (gnc:html-table-set-cell! table 0 0 "x") + (test-equal "html-table-set-cell! 0 0" + "\n\n\n
x
\n" + (string-concatenate + (gnc:html-document-tree-collapse + (gnc:html-table-render table doc)))) + + (gnc:html-table-set-cell! table 2 2 "y" "z") + (test-equal "html-table-set-cell! 2 2" + "\n\n\n\n\n\n\n\n
x
y z
\n" + (string-concatenate + (gnc:html-document-tree-collapse + (gnc:html-table-render table doc)))) + + (let* ((table1 (gnc:make-html-table)) + (cell (gnc:make-html-table-cell "ab"))) + (gnc:html-table-set-cell! table1 1 4 cell) + (test-equal "html-table-set-cell! 1 4" + "\n\n\n\n\n\n\n\n
ab
\n" + (string-concatenate + (gnc:html-document-tree-collapse + (gnc:html-table-render table1 doc)))) + + (gnc:html-table-set-cell/tag! table1 1 4 "tag" cell) + (test-equal "html-table-set-cell/tag! 1 4" + "\n\n\n\n\n ab\n\n\n
\n" + (string-concatenate + (gnc:html-document-tree-collapse + (gnc:html-table-render table1 doc)))))) + (test-end "html-table arbitrary row/col modification") + (test-begin "html-table-cell renderers") (let ((doc (gnc:make-html-document)) (cell (gnc:make-html-table-cell 4)))