diff --git a/gnucash/report/report-system/html-table.scm b/gnucash/report/report-system/html-table.scm index 97615b64ac..971e13dd6b 100644 --- a/gnucash/report/report-system/html-table.scm +++ b/gnucash/report/report-system/html-table.scm @@ -495,7 +495,7 @@ (new-suffix (list element))) (do ((i current-width (+ i 1))) - ((< i width) #f) + ((>= 1 (- width i))) (set! new-suffix (cons #f new-suffix))) (append row new-suffix))) diff --git a/gnucash/report/report-system/test/test-report-html.scm b/gnucash/report/report-system/test/test-report-html.scm index a67e43a2e5..3bd7b44971 100644 --- a/gnucash/report/report-system/test/test-report-html.scm +++ b/gnucash/report/report-system/test/test-report-html.scm @@ -740,20 +740,20 @@ HTML Document Title
\n\ ;; col-headers must be #f or a list (gnc:html-table-set-row-headers! test-table #t) (gnc:html-table-set-caption! test-table #t) - (gnc:html-table-append-row! test-table "Row 1") - (gnc:html-table-append-row! test-table "Row 2") - (gnc:html-table-append-column! test-table '("Col A" "Col B" "Col C")) + (gnc:html-table-append-row! test-table "r1c1") + (gnc:html-table-append-row! test-table '("r2c1" "r2c2" "r2c3")) + (gnc:html-table-append-row! test-table '("r3c1" "r3c2")) + (gnc:html-table-append-column! test-table '("r1c4" "r2c4" "r3c4" "r4c4")) (test-equal "Check Num Rows after append column" - 3 + 4 (gnc:html-table-num-rows test-table) ) - (test-expect-fail 2) - (test-equal "Check data after append column - Bug" - '((" " "Col C") ("Row 2" "Col B") ("Row 1" "Col A")) + (test-equal "Check data after append column" + '((#f #f #f "r4c4") ("r3c1" "r3c2" #f "r3c4") ("r2c1" "r2c2" "r2c3" "r2c4") ("r1c1" #f #f "r1c4")) (gnc:html-table-data test-table) ) - (test-equal "Check Cell Access after append column - Bug 796831" - "Col C" + (test-equal "Check Cell Access after append column" + "r3c2" (gnc:html-table-get-cell test-table 2 1) ) )