From 62f33ae7e0e2df49cdbc96d383aaff4497018a13 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 10 Feb 2012 09:35:02 -1000 Subject: Moved some files into their right locations --- test/input/divzero.dat | 11 ++++++++++ test/input/spaces.dat | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 test/input/divzero.dat create mode 100644 test/input/spaces.dat (limited to 'test/input') diff --git a/test/input/divzero.dat b/test/input/divzero.dat new file mode 100644 index 00000000..009c9d64 --- /dev/null +++ b/test/input/divzero.dat @@ -0,0 +1,11 @@ +; -*- ledger -*- +; Time-stamp: <2011-11-22 13:59 (cpearls)> + +; this journal file will cause a divide by zero error. The divide by +; zero goes away if you add a significant figure to any of the last +; divisors in either transaction ( "10.74" -> "10.740" ) + +2011/04/05 * VSGBX Dividend + Assets:Investments:401K:Matching ( (1.0/3.0)*0.11/10.74 VSGBX) ; 0.003414 + Assets:Investments:401K:Deferred ( (2.0/3.0)*0.11/10.74 VSGBX) ; 0.006828 + Income:Exempt:Dividends $-0.11 diff --git a/test/input/spaces.dat b/test/input/spaces.dat new file mode 100644 index 00000000..1ada1b61 --- /dev/null +++ b/test/input/spaces.dat @@ -0,0 +1,55 @@ +; this file contains spaces after the payee and tag values. Ledger +; should ignore the trailing spaces for the purposes of determining +; unique values +; +; bug 584 and 550 reported trailing spaces being considered +; significant in payee and tag values. +; +; running +; ledger -f test/spaces.dat payees +; yielded two distinct payees, because utils.h/next_element() didn't +; handle a single space followed by a null correctly. +; +; running +; ledger -f test/spaces.dat reg --group-by "tag('test')" +; yielded four groups. + +2011/11/28 * test + ; no space after payee or tag value + Expenses:misc $1 ; test: spaces + Assets:checking + +2011/11/28 * test + ; single space after payee and tag value + Expenses:misc $2 ; test: spaces + Assets:checking + +2011/11/28 test + ; two spaces after payee and tag value + Expenses:misc $4 ; test: spaces + Assets:checking + +2011/11/28 test + ; three spaces after payee and tag value + Expenses:misc $8 ; test: spaces + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has no space after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has one space after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has two spaces after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has three spaces after + Expenses:misc 1 COM + Assets:checking -- cgit v1.2.3