From 3229839055b62ad1580e0c53fee6dd9fb4eb7aa0 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 22 Feb 2022 16:30:41 +0800 Subject: [PATCH] [test-standard-category-report] Add test for allocation ratios --- .../standard/test/test-standard-category-report.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnucash/report/reports/standard/test/test-standard-category-report.scm b/gnucash/report/reports/standard/test/test-standard-category-report.scm index 6a7aca9ec1..87fd3687e0 100644 --- a/gnucash/report/reports/standard/test/test-standard-category-report.scm +++ b/gnucash/report/reports/standard/test/test-standard-category-report.scm @@ -243,6 +243,16 @@ (test-equal "auto" '("Auto") (sxml->table-row-col sxml 1 0 2)) + + ;; test ratios + (set-option expense-options gnc:pagename-display "Replace amounts with percentage ratios." #t) + (let ((sxml (gnc:options->sxml expense-report-uuid expense-options + "test-standard-category-report" + "ratios" + #:strip-tag "script"))) + (test-equal "multi-acct ratios" + '("57.14 %" "14.29 %" "14.29 %" "14.29 %" "$14.00") + (cdr (sxml->table-row-col sxml 1 2 #f)))) (test-end "multi-acct-test"))))