From 13436637c6a9b989cc4235342c72764b0c8cad14 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 17 Aug 2018 07:37:26 +0100 Subject: [PATCH] lib: "decimal point" -> "decimal separator" in error message --- hledger-lib/Hledger/Read/JournalReader.hs | 3 +-- tests/journal/amounts-and-commodities.test | 4 ++-- tests/journal/numbers.test | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hledger-lib/Hledger/Read/JournalReader.hs b/hledger-lib/Hledger/Read/JournalReader.hs index ff4f898b8..feb60546a 100644 --- a/hledger-lib/Hledger/Read/JournalReader.hs +++ b/hledger-lib/Hledger/Read/JournalReader.hs @@ -309,7 +309,7 @@ commoditydirectiveonelinep = do else modify' (\j -> j{jcommodities=M.insert acommodity comm $ jcommodities j}) pleaseincludedecimalpoint :: String -pleaseincludedecimalpoint = "to avoid ambiguity, please include a decimal point in commodity directives" +pleaseincludedecimalpoint = "to avoid ambiguity, please include a decimal separator in commodity directives" -- | Parse a multi-line commodity directive, containing 0 or more format subdirectives. -- @@ -470,7 +470,6 @@ commodityconversiondirectivep = do --- ** transactions --- TODO transactionmodifierp ? transactionrewritep ? transactionmodifierp :: JournalParser m TransactionModifier transactionmodifierp = do char '=' "modifier transaction" diff --git a/tests/journal/amounts-and-commodities.test b/tests/journal/amounts-and-commodities.test index 53af16753..3f5c04c3b 100644 --- a/tests/journal/amounts-and-commodities.test +++ b/tests/journal/amounts-and-commodities.test @@ -123,7 +123,7 @@ $ hledger -f- bal -V -N $ hledger -f- reg amt:1 -# 10. This commodity directive should complain about a missing decimal point, +# 10. This commodity directive should complain about a missing decimal separator, # which we now require. < commodity 1 000 USD @@ -132,7 +132,7 @@ commodity 1 000 USD (a) USD1 000 $ hledger -f- bal ->2 /decimal point/ +>2 /decimal separator/ >=1 # 11. After a space-grouped amount, a posting comment should parse. diff --git a/tests/journal/numbers.test b/tests/journal/numbers.test index ba2cf51b7..0b51a9ec0 100644 --- a/tests/journal/numbers.test +++ b/tests/journal/numbers.test @@ -126,11 +126,11 @@ commodity €1,000.00 >>>2 >>>=0 -# 11. Commodity directive requires a decimal point +# 11. Commodity directive requires a decimal separator hledger bal -f - <<< commodity 1000 EUR ->>>2 /please include a decimal point/ +>>>2 /please include a decimal separator/ >>>=1 # 12. Commodity directive with zero precision