From 00a8abd46d378067d8104b9e285dc6df104f7993 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 24 Aug 2023 23:57:36 +0100 Subject: [PATCH] dev: commodity-styles tests: cleanup --- hledger/test/cli/commodity-style.test | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hledger/test/cli/commodity-style.test b/hledger/test/cli/commodity-style.test index 178a95b04..93c11eb3f 100644 --- a/hledger/test/cli/commodity-style.test +++ b/hledger/test/cli/commodity-style.test @@ -1,4 +1,4 @@ -# Test whether only the style without a symbol is changed +# 1. Test whether only the style without a symbol is changed < 2021-07-09 no symbol (a) 1234 @@ -10,7 +10,6 @@ (a) $ 1,234.56 $ hledger -f- print -c '10 00' -> 2021-07-09 no symbol (a) 12 34 @@ -20,40 +19,43 @@ $ hledger -f- print -c '10 00' 2021-07-09 Dollar (a) $ 1,234.56 ->= 0 -# Test whether setting the style of multiple symbols work +>= + +# 2. Test whether setting the style of multiple symbols work < 2021-07-09 Euro (a) EUR 1,234.56 2021-07-09 Dollar (a) $ 1.234,56 + $ hledger -f- print -c 'EUR 1.000,00' -c '$ 1,000.00' -> 2021-07-09 Euro (a) EUR 1.234,56 2021-07-09 Dollar (a) $ 1,234.56 ->= 0 -# When setting the same symbol multiple times, the last one is in effect +>= + +# 3. When setting the same symbol multiple times, the last one is in effect < 2021-07-09 Euro (a) EUR 1234 + $ hledger -f- print -c 'EUR 1.000,00' -c 'EUR 1,000.00' -> 2021-07-09 Euro (a) EUR 1,234.00 ->= 0 -# Commodity styles are applied to quantity and price of a commodity (except for precision) +>= + +# 4. Commodity styles are applied to quantity and price of a commodity (except for precision) < 2021-09-12 buy A (a) 1,234 A @ $ 1234,56 + $ hledger -f- print -c '1,000.0 $' -c 'A 1000.0' -> 2021-09-12 buy A (a) A 1.234 @ 1,234.56 $ ->= 0 +>=