mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug796829 - Report HTML - HTML table rows are prepended not as list elements
includes update of test-report-html.scm (and CMakeLists.txt)
This commit is contained in:
parent
59c78c2668
commit
412d797eae
@ -364,8 +364,9 @@
|
||||
(define (gnc:html-table-prepend-row! table newrow)
|
||||
(let* ((dd (gnc:html-table-data table))
|
||||
(current-num-rows (gnc:html-table-num-rows table))
|
||||
(new-num-rows (+ current-num-rows 1)))
|
||||
(set! dd (append dd (list newrow)))
|
||||
(new-num-rows (+ current-num-rows 1))
|
||||
(newrow-list (if (list? newrow) newrow (list newrow))))
|
||||
(set! dd (append dd (list newrow-list)))
|
||||
(gnc:html-table-set-num-rows-internal!
|
||||
table
|
||||
new-num-rows)
|
||||
|
@ -686,13 +686,14 @@ HTML Document Title</title></head><body></body>\n\
|
||||
(gnc:html-table-prepend-row! test-table "Row 1")
|
||||
(gnc:html-table-prepend-row! test-table "Row 0")
|
||||
(gnc:html-table-prepend-row! test-table "Row -1")
|
||||
(gnc:html-table-prepend-row! test-table '("r-2-c1" "r-2-c2"))
|
||||
(test-equal "Check Num Rows after prepend row"
|
||||
4
|
||||
5
|
||||
(gnc:html-table-num-rows test-table)
|
||||
)
|
||||
(test-expect-fail 1)
|
||||
(test-equal "Check data after prepend row - Bug 796829"
|
||||
'(("Row 2") ("Row 1") ("Row 0") ("Row -1"))
|
||||
(test-equal "Check data after prepend row"
|
||||
|
||||
'(("Row 2") ("Row 1") ("Row 0") ("Row -1") ("r-2-c1" "r-2-c2"))
|
||||
(gnc:html-table-data test-table)
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user