From a6b7ef597f917ee48f0722f64e3434162aa6b64c Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 9 Mar 2010 23:06:27 +0000 Subject: [PATCH] fix extra newline in balance error msg --- hledger-lib/Ledger/Transaction.hs | 2 +- tests/unbalanced.test | 2 +- tests/unicode-error-message.test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Ledger/Transaction.hs b/hledger-lib/Ledger/Transaction.hs index a95793130..0f79fc548 100644 --- a/hledger-lib/Ledger/Transaction.hs +++ b/hledger-lib/Ledger/Transaction.hs @@ -139,7 +139,7 @@ balanceTransaction t@Transaction{tpostings=ps} balance p | isReal p && not (hasAmount p) = p{pamount = costOfMixedAmount (-otherstotal)} | otherwise = p where otherstotal = sum $ map pamount withamounts - printerr s = unlines [s, showTransactionUnelided t] + printerr s = intercalate "\n" [s, showTransactionUnelided t] nonzerobalanceerror :: Transaction -> String nonzerobalanceerror t = printf "could not balance this transaction (%s%s%s)" rmsg sep bvmsg diff --git a/tests/unbalanced.test b/tests/unbalanced.test index a256f00fe..c5b592864 100644 --- a/tests/unbalanced.test +++ b/tests/unbalanced.test @@ -6,7 +6,7 @@ >>>2 "-" (line 4, column 1): unexpected end of input -could not balance this transaction (real postings are off by 0.1): +could not balance this transaction (real postings are off by 0.1) 2009/01/01 a b 1.1 c -1 diff --git a/tests/unicode-error-message.test b/tests/unicode-error-message.test index 16fe0618f..b55e23587 100644 --- a/tests/unicode-error-message.test +++ b/tests/unicode-error-message.test @@ -6,7 +6,7 @@ >>>2 "-" (line 4, column 1): unexpected end of input -could not balance this transaction (real postings are off by -1): +could not balance this transaction (real postings are off by -1) 2009/01/01 broken entry дебит 1 кредит -2