From 31ae51b435c81fce0ce0071ca4d6d5e203a85299 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 16 Sep 2009 17:05:59 +0000 Subject: [PATCH] add tests for some observed issues --- tests/decimals-balance-failure.test | 9 +++++++++ tests/extra-date-slash.test | 8 ++++++++ tests/print-preserves-comments.test | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 tests/decimals-balance-failure.test create mode 100644 tests/extra-date-slash.test create mode 100644 tests/print-preserves-comments.test diff --git a/tests/decimals-balance-failure.test b/tests/decimals-balance-failure.test new file mode 100644 index 000000000..3a5b7828d --- /dev/null +++ b/tests/decimals-balance-failure.test @@ -0,0 +1,9 @@ +# b amount with no decimal places, in middle, causes balance failure (0.6.1) +-f - print +<<< +2009/1/1 x + a $1.25 + b $-1 + c $-0.25 + +>>>2 diff --git a/tests/extra-date-slash.test b/tests/extra-date-slash.test new file mode 100644 index 000000000..80fde3b29 --- /dev/null +++ b/tests/extra-date-slash.test @@ -0,0 +1,8 @@ +# extra slash before [ silently breaks effective date (0.6.1) +-f - print --effective -p 2009/1/2 +<<< +2009/1/1/[=2009/1/2] x + a 1 + b + +>>>2 /unexpected/ diff --git a/tests/print-preserves-comments.test b/tests/print-preserves-comments.test new file mode 100644 index 000000000..3b3359c92 --- /dev/null +++ b/tests/print-preserves-comments.test @@ -0,0 +1,18 @@ +# let's have print preserve comments as far as possible +-f - print +<<< +2009/1/1 x ; description comment + a 1 ; amount comment + ; middle posting comment + b + ; trailing posting comment +; post-entry comment +>>> +2009/01/01 x ; description comment + a 1 ; amount comment + ; middle posting comment + b + ; trailing posting comment +; post-entry comment (?) + +