From a8326001822c796b207ac448ee79cbf31ebfa555 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Wed, 26 Sep 2018 21:46:29 +0800 Subject: [PATCH] [test-transaction] test for display/enable links? feature --- .../report/standard-reports/test/test-transaction.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm index 08be14d4e6..755aba2983 100644 --- a/gnucash/report/standard-reports/test/test-transaction.scm +++ b/gnucash/report/standard-reports/test/test-transaction.scm @@ -472,6 +472,16 @@ (length ((sxpath '(// (table 1) // (tr -1) // td)) sxml)) 1))) + (set-option! options "Display" "Enable links" #f) + (let ((sxml (options->sxml options "disable hyperlinks"))) + (test-assert "no anchor when disabling hyperlinks" + (zero? (length ((sxpath '(// a // *text*)) sxml))))) + + (set-option! options "Display" "Enable links" #t) + (let ((sxml (options->sxml options "enable hyperlinks"))) + (test-assert "anchors exist when enabling hyperlinks" + (positive? (length ((sxpath '(// a // *text*)) sxml))))) + (set-option! options "Display" "Amount" 'none) (let ((sxml (options->sxml options "no columns"))) (test-assert "all display columns off, without amount nor subtotals, there should be 0 column"