From 23902686a32d5f0812095462c567ccb3f768c7db Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Thu, 5 Jun 2014 19:46:22 -0400 Subject: Don't lose commodity when cost is not separated by whitespace When a cost was specified without a whitespace after the @ symbol, as in @$5.01, this was incorrectly parsed as 5.01 (losing the commodity) rather than $5.01. Bug fix for #1050 --- test/regress/1050.test | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/regress/1050.test (limited to 'test/regress/1050.test') diff --git a/test/regress/1050.test b/test/regress/1050.test new file mode 100644 index 00000000..a214e053 --- /dev/null +++ b/test/regress/1050.test @@ -0,0 +1,39 @@ + +D $1000.00 +D £1000.00 +D €1000.00 +D 1000.00 EUR + +2014-06-05 * Test + A 2 EUR @$1.37 + C + +2014-06-05 * Test + A 2 EUR @@£1.62 + C + +2014-06-05 * Test + A 2 EUR (@)€1.00 + C + +2014-06-05 * Test + A 2 EUR (@@)€2.00 + C + +test bal + 8.00 EUR A + $-2.74 + £-1.62 + €-4.00 C +-------------------- + $-2.74 + 8.00 EUR + £-1.62 + €-4.00 +end test + +test pricedb +P 2014/06/05 00:00:00 EUR $1.37 +P 2014/06/05 00:00:00 EUR £0.81 +end test + -- cgit v1.2.3