# This patch was submitted upstream to: https://bugs.gnucash.org/show_bug.cgi?id=797008. From c20d74bebca516d0e391724202aad511967fe109 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 2 Jan 2019 14:46:28 -0500 Subject: [PATCH] tests: Fix a test failure in test-transaction.scm. With the New Year upon us, a test which was hard-coded to use 2018 now failed. Fixes issue #797008 (see: https://bugs.gnucash.org/show_bug.cgi?id=797008). * gnucash/report/standard-reports/test/test-transaction.scm: (trep-tests): Use the current year in the test string instead of a static one. --- gnucash/report/standard-reports/test/test-transaction.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm index 755aba298..ae3fbd5c1 100644 --- a/gnucash/report/standard-reports/test/test-transaction.scm +++ b/gnucash/report/standard-reports/test/test-transaction.scm @@ -5,6 +5,7 @@ (use-modules (gnucash report stylesheets)) (use-modules (gnucash report report-system)) (use-modules (gnucash report report-system test test-extras)) +(use-modules (srfi srfi-19)) (use-modules (srfi srfi-64)) (use-modules (gnucash engine test srfi64-extras)) (use-modules (sxml simple)) @@ -643,7 +644,8 @@ (set-option! options "General" "Show original currency amount" #t) (set-option! options "Sorting" "Primary Key" 'date) (set-option! options "Sorting" "Primary Subtotal for Date Key" 'none) - (let* ((sxml (options->sxml options "dual columns"))) + (let* ((sxml (options->sxml options "dual columns")) + (current-year (date->string (current-date) "~y"))) (test-equal "dual amount column, with original currency headers" (list "Date" "Num" "Description" "Memo/Notes" "Account" "Debit (USD)" "Credit (USD)" "Debit" "Credit") @@ -652,7 +654,8 @@ (list "Grand Total" "$2,280.00" "$2,280.00") (get-row-col sxml -1 #f)) (test-equal "dual amount column, first transaction correct" - (list "01/03/18" "$103 income" "Root.Asset.Bank" "$103.00" "$103.00") + (list (string-append "01/03/" current-year) "$103 income" + "Root.Asset.Bank" "$103.00" "$103.00") (get-row-col sxml 1 #f))) ) -- 2.19.0 55465fca4b872c371daf2a46de88b33'>Switch to Guile-Gcrypt....Ludovic Courtès 2018-06-01build: Check for Guile-SQLite3....Ludovic Courtès 2018-02-26build: Require Guile >= 2.0.13....Ludovic Courtès 2018-01-06build: Detect broken 'equal?' in Guile 2.2.1....Ludovic Courtès 2017-06-30build: Remove check for broken (srfi srfi-37)....Ludovic Courtès 2017-02-20gnu: Add bootstrap-binaries for 'aarch64-linux'....Efraim Flashner 2016-11-25offload: Use Guile-SSH instead of GNU lsh....Ludovic Courtès 2016-08-10build: Correctly determine the system type for GNU/Hurd systems....Manolis Ragkousis 2016-07-20Merge branch 'master' into core-updatesLudovic Courtès 2016-07-19Add (guix zlib)....Ludovic Courtès 2016-06-23build: Remove unneeded conditionals for (guix build syscalls)....Manolis Ragkousis 2016-03-19build: Protect against misconfiguration of localstatedir....Ludovic Courtès 2016-01-13build: Use 127 as the Linux hash-bang limit....Ludovic Courtès 2016-01-12build: 'make check' errors out if file name limits would be hit....Ludovic Courtès 2016-01-12build: Warn against long hash bang lines for tests....Ludovic Courtès 2015-12-01build: Fix detection of ARM systems....Ludovic Courtès 2015-11-25build: Reject ARMv6 systems....Ludovic Courtès 2015-10-09build: Fix libgcrypt detection on FHS systems....Ludovic Courtès 2015-10-06build: Automatically determine libgcrypt's file name....Ludovic Courtès 2015-08-27build: Do not build (guix build syscalls) if 'mount' is missing from libc....Ludovic Courtès