From 46a419a5dabcc6b02231f12357b20f70a14cfe63 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Nov 2009 21:18:09 -0500 Subject: Added DocTests to verify documentation examples --- tools/Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/Makefile.am') diff --git a/tools/Makefile.am b/tools/Makefile.am index 13ea4e7f..d84229f4 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -247,7 +247,7 @@ endif TESTS = if HAVE_PYTHON -TESTS += RegressTests BaselineTests ConfirmTests GenerateTests +TESTS += RegressTests BaselineTests DocTests ConfirmTests GenerateTests endif if HAVE_CPPUNIT @@ -381,6 +381,14 @@ BaselineTests: $(srcdir)/test/RegressTests.py echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/baseline \"\$$@\"" > $@ chmod 755 $@ +DocTests_SOURCES = test/RegressTests.py + +EXTRA_DIST += test/doc + +DocTests: $(srcdir)/test/RegressTests.py + echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/doc \"\$$@\"" > $@ + chmod 755 $@ + ConfirmTests_SOURCES = test/ConfirmTests.py EXTRA_DIST += test/input @@ -424,10 +432,12 @@ endif fullcheck: cppunittests @$(top_builddir)/RegressTests --verify @$(top_builddir)/BaselineTests --verify + @$(top_builddir)/DocTests --verify @$(top_builddir)/ConfirmTests --verify @$(top_builddir)/GenerateTests --verify @$(top_builddir)/RegressTests --gmalloc @$(top_builddir)/BaselineTests --gmalloc + @$(top_builddir)/DocTests --gmalloc # @$(top_builddir)/ConfirmTests --gmalloc # @$(top_builddir)/GenerateTests --gmalloc -- cgit v1.2.3 From 95e08cc46fb499866f2491b4a8aad9fe29ac6a00 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 2 Nov 2009 00:45:39 -0500 Subject: Make the source directory available to all tests --- test/ConfirmTests.py | 2 +- test/GenerateTests.py | 6 +++--- test/LedgerHarness.py | 25 +++++++++++++++---------- test/RegressTests.py | 10 +++++++--- tools/Makefile.am | 10 +++++----- 5 files changed, 31 insertions(+), 22 deletions(-) (limited to 'tools/Makefile.am') diff --git a/test/ConfirmTests.py b/test/ConfirmTests.py index 0b3d4897..901ae7cd 100755 --- a/test/ConfirmTests.py +++ b/test/ConfirmTests.py @@ -10,7 +10,7 @@ import re from LedgerHarness import LedgerHarness harness = LedgerHarness(sys.argv) -tests = sys.argv[2] +tests = sys.argv[3] if not os.path.isdir(tests) and not os.path.isfile(tests): sys.exit(1) diff --git a/test/GenerateTests.py b/test/GenerateTests.py index aa36737d..d60e0581 100755 --- a/test/GenerateTests.py +++ b/test/GenerateTests.py @@ -104,9 +104,9 @@ def generation_test(seed): beg_range = 1 end_range = 20 -if len(sys.argv) > 3: - beg_range = int(sys.argv[2]) - end_range = int(sys.argv[3]) +if len(sys.argv) > 4: + beg_range = int(sys.argv[3]) + end_range = int(sys.argv[4]) for i in range(beg_range, end_range): if generation_test(i): diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py index cf65f590..7e8cfa3d 100755 --- a/test/LedgerHarness.py +++ b/test/LedgerHarness.py @@ -7,22 +7,27 @@ import re from subprocess import Popen, PIPE class LedgerHarness: - ledger = None - succeeded = 0 - failed = 0 - verify = False - gmalloc = False + ledger = None + sourcepath = None + succeeded = 0 + failed = 0 + verify = False + gmalloc = False def __init__(self, argv): if not os.path.isfile(argv[1]): print "Cannot find ledger at '%s'" % argv[1] sys.exit(1) + if not os.path.isdir(argv[2]): + print "Cannot find source path at '%s'" % argv[2] + sys.exit(1) - self.ledger = argv[1] - self.succeeded = 0 - self.failed = 0 - self.verify = '--verify' in argv - self.gmalloc = '--gmalloc' in argv + self.ledger = argv[1] + self.sourcepath = argv[2] + self.succeeded = 0 + self.failed = 0 + self.verify = '--verify' in argv + self.gmalloc = '--gmalloc' in argv def run(self, command, verify=None, gmalloc=None, columns=True): env = os.environ.copy() diff --git a/test/RegressTests.py b/test/RegressTests.py index 4d23f6b5..13a0a113 100755 --- a/test/RegressTests.py +++ b/test/RegressTests.py @@ -11,7 +11,7 @@ from difflib import unified_diff from LedgerHarness import LedgerHarness harness = LedgerHarness(sys.argv) -tests = sys.argv[2] +tests = sys.argv[3] if not os.path.isdir(tests) and not os.path.isfile(tests): sys.exit(1) @@ -27,11 +27,15 @@ class RegressFile: line == ">>>2\n" or \ line.startswith("===") + def transform_line(self, line): + line = re.sub('\$sourcepath', harness.sourcepath, line) + return line + def read_section(self): lines = [] line = self.fd.readline() while not self.is_directive(line): - lines.append(line) + lines.append(self.transform_line(line)) line = self.fd.readline() return (lines, line) @@ -60,7 +64,7 @@ class RegressFile: test['exitcode'] = int(match.group(1)) return test else: - test['command'] = line + test['command'] = self.transform_line(line) line = self.fd.readline() return None diff --git a/tools/Makefile.am b/tools/Makefile.am index d84229f4..4662e73d 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -370,7 +370,7 @@ RegressTests_SOURCES = test/RegressTests.py EXTRA_DIST += test/regress test/convert.py test/LedgerHarness.py RegressTests: $(srcdir)/test/RegressTests.py - echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress \"\$$@\"" > $@ + echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/regress \"\$$@\"" > $@ chmod 755 $@ BaselineTests_SOURCES = test/RegressTests.py @@ -378,7 +378,7 @@ BaselineTests_SOURCES = test/RegressTests.py EXTRA_DIST += test/baseline BaselineTests: $(srcdir)/test/RegressTests.py - echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/baseline \"\$$@\"" > $@ + echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/baseline \"\$$@\"" > $@ chmod 755 $@ DocTests_SOURCES = test/RegressTests.py @@ -386,7 +386,7 @@ DocTests_SOURCES = test/RegressTests.py EXTRA_DIST += test/doc DocTests: $(srcdir)/test/RegressTests.py - echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/doc \"\$$@\"" > $@ + echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/doc \"\$$@\"" > $@ chmod 755 $@ ConfirmTests_SOURCES = test/ConfirmTests.py @@ -401,13 +401,13 @@ test/input/mondo.dat: test/input/standard.dat done ConfirmTests: $(srcdir)/test/ConfirmTests.py - echo "$(PYTHON) $(srcdir)/test/ConfirmTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/input \"\$$@\"" > $@ + echo "$(PYTHON) $(srcdir)/test/ConfirmTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/input \"\$$@\"" > $@ chmod 755 $@ GenerateTests_SOURCES = test/GenerateTests.py GenerateTests: $(srcdir)/test/GenerateTests.py - echo "$(PYTHON) $(srcdir)/test/GenerateTests.py $(top_builddir)/ledger$(EXEEXT) 1 20 \"\$$@\"" > $@ + echo "$(PYTHON) $(srcdir)/test/GenerateTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) 1 20 \"\$$@\"" > $@ chmod 755 $@ FULLCHECK=$(srcdir)/test/fullcheck.sh -- cgit v1.2.3 From 90c7298049546bd8d1f4f64aeedd6569780f9259 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 2 Nov 2009 01:58:53 -0500 Subject: Renamed the DocTests to ManualTests --- test/doc/transaction-codes-1.test | 22 ---------------------- test/doc/transaction-codes-2.test | 24 ------------------------ test/doc/transaction-notes-1.test | 24 ------------------------ test/doc/transaction-notes-2.test | 23 ----------------------- test/doc/transaction-notes-3.test | 23 ----------------------- test/doc/transaction-notes-4.test | 27 --------------------------- test/doc/transaction-status-1.test | 19 ------------------- test/doc/transaction-status-2.test | 17 ----------------- test/doc/transaction-status-3.test | 18 ------------------ test/doc/transaction-status-4.test | 17 ----------------- test/manual/transaction-codes-1.test | 22 ++++++++++++++++++++++ test/manual/transaction-codes-2.test | 24 ++++++++++++++++++++++++ test/manual/transaction-notes-1.test | 24 ++++++++++++++++++++++++ test/manual/transaction-notes-2.test | 23 +++++++++++++++++++++++ test/manual/transaction-notes-3.test | 23 +++++++++++++++++++++++ test/manual/transaction-notes-4.test | 27 +++++++++++++++++++++++++++ test/manual/transaction-status-1.test | 19 +++++++++++++++++++ test/manual/transaction-status-2.test | 17 +++++++++++++++++ test/manual/transaction-status-3.test | 18 ++++++++++++++++++ test/manual/transaction-status-4.test | 17 +++++++++++++++++ tools/Makefile.am | 14 +++++++------- 21 files changed, 221 insertions(+), 221 deletions(-) delete mode 100644 test/doc/transaction-codes-1.test delete mode 100644 test/doc/transaction-codes-2.test delete mode 100644 test/doc/transaction-notes-1.test delete mode 100644 test/doc/transaction-notes-2.test delete mode 100644 test/doc/transaction-notes-3.test delete mode 100644 test/doc/transaction-notes-4.test delete mode 100644 test/doc/transaction-status-1.test delete mode 100644 test/doc/transaction-status-2.test delete mode 100644 test/doc/transaction-status-3.test delete mode 100644 test/doc/transaction-status-4.test create mode 100644 test/manual/transaction-codes-1.test create mode 100644 test/manual/transaction-codes-2.test create mode 100644 test/manual/transaction-notes-1.test create mode 100644 test/manual/transaction-notes-2.test create mode 100644 test/manual/transaction-notes-3.test create mode 100644 test/manual/transaction-notes-4.test create mode 100644 test/manual/transaction-status-1.test create mode 100644 test/manual/transaction-status-2.test create mode 100644 test/manual/transaction-status-3.test create mode 100644 test/manual/transaction-status-4.test (limited to 'tools/Makefile.am') diff --git a/test/doc/transaction-codes-1.test b/test/doc/transaction-codes-1.test deleted file mode 100644 index 878c5cac..00000000 --- a/test/doc/transaction-codes-1.test +++ /dev/null @@ -1,22 +0,0 @@ -reg --columns=60 food and code xfer -<<< -2009/10/29 (XFER) Panera Bread - Expenses:Food $4.50 - Assets:Checking - -2009/10/30 (DEP) Pay day! - Assets:Checking $20.00 - Income - -2009/10/30 (XFER) Panera Bread - Expenses:Food $4.50 - Assets:Checking - -2009/10/31 (559385768438A8D7) Panera Bread - Expenses:Food $4.50 - Liabilities:Credit Card ->>>1 -09-Oct-29 Panera Bread Expenses:Food $4.50 $4.50 -09-Oct-30 Panera Bread Expenses:Food $4.50 $9.00 ->>>2 -=== 0 diff --git a/test/doc/transaction-codes-2.test b/test/doc/transaction-codes-2.test deleted file mode 100644 index 4e4c76cf..00000000 --- a/test/doc/transaction-codes-2.test +++ /dev/null @@ -1,24 +0,0 @@ -bal checking --set-reported-account=code -<<< -2009/10/29 (XFER) Panera Bread - Expenses:Food $4.50 - Assets:Checking - -2009/10/30 (DEP) Pay day! - Assets:Checking $20.00 - Income - -2009/10/30 (XFER) Panera Bread - Expenses:Food $4.50 - Assets:Checking - -2009/10/31 (559385768438A8D7) Panera Bread - Expenses:Food $4.50 - Liabilities:Credit Card ->>>1 - $20.00 DEP - $-9.00 XFER --------------------- - $11.00 ->>>2 -=== 0 diff --git a/test/doc/transaction-notes-1.test b/test/doc/transaction-notes-1.test deleted file mode 100644 index d3fab3b6..00000000 --- a/test/doc/transaction-notes-1.test +++ /dev/null @@ -1,24 +0,0 @@ -reg --columns=60 food and note eat -<<< -2009/11/01 Panera Bread ; Got something to eat - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Coffee - ; Let’s see, I ate a whole bunch of stuff, drank some coffee, - ; pondered a bagel, then decided against the donut. - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Dining - ; :Eating: - ; This is another long note, after the metadata. - Expenses:Food $4.50 - Assets:Checking ->>>1 -09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 -09-Nov-01 Panera Bread Expenses:Food $4.50 $9.00 ->>>2 -=== 0 diff --git a/test/doc/transaction-notes-2.test b/test/doc/transaction-notes-2.test deleted file mode 100644 index b7a258e0..00000000 --- a/test/doc/transaction-notes-2.test +++ /dev/null @@ -1,23 +0,0 @@ -reg --columns=60 food and tag eating -<<< -2009/11/01 Panera Bread ; Got something to eat - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Coffee - ; Let’s see, I ate a whole bunch of stuff, drank some coffee, - ; pondered a bagel, then decided against the donut. - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Dining - ; :Eating: - ; This is another long note, after the metadata. - Expenses:Food $4.50 - Assets:Checking ->>>1 -09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 ->>>2 -=== 0 diff --git a/test/doc/transaction-notes-3.test b/test/doc/transaction-notes-3.test deleted file mode 100644 index 9d532d5f..00000000 --- a/test/doc/transaction-notes-3.test +++ /dev/null @@ -1,23 +0,0 @@ -reg --columns=60 food and tag type=dining -<<< -2009/11/01 Panera Bread ; Got something to eat - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Coffee - ; Let’s see, I ate a whole bunch of stuff, drank some coffee, - ; pondered a bagel, then decided against the donut. - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Dining - ; :Eating: - ; This is another long note, after the metadata. - Expenses:Food $4.50 - Assets:Checking ->>>1 -09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 ->>>2 -=== 0 diff --git a/test/doc/transaction-notes-4.test b/test/doc/transaction-notes-4.test deleted file mode 100644 index 516094c7..00000000 --- a/test/doc/transaction-notes-4.test +++ /dev/null @@ -1,27 +0,0 @@ -bal food and tag type --set-reported-account='"Tags:" + tag("Type")' -<<< -2009/11/01 Panera Bread ; Got something to eat - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Coffee - ; Let’s see, I ate a whole bunch of stuff, drank some coffee, - ; pondered a bagel, then decided against the donut. - Expenses:Food $4.50 - Assets:Checking - -2009/11/01 Panera Bread - ; Type: Dining - ; :Eating: - ; This is another long note, after the metadata. - Expenses:Food $4.50 - Assets:Checking ->>>1 - $9.00 Tags - $4.50 Coffee - $4.50 Dining --------------------- - $9.00 ->>>2 -=== 0 diff --git a/test/doc/transaction-status-1.test b/test/doc/transaction-status-1.test deleted file mode 100644 index 4bdf893a..00000000 --- a/test/doc/transaction-status-1.test +++ /dev/null @@ -1,19 +0,0 @@ -reg --columns=60 food -<<< -2009/10/31 * Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/01 ! Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/02 Panera Bread - Expenses:Food $4.50 - Assets ->>>1 -09-Oct-31 Panera Bread Expenses:Food $4.50 $4.50 -09-Nov-01 Panera Bread Expenses:Food $4.50 $9.00 -09-Nov-02 Panera Bread Expenses:Food $4.50 $13.50 ->>>2 -=== 0 diff --git a/test/doc/transaction-status-2.test b/test/doc/transaction-status-2.test deleted file mode 100644 index dbbb04ae..00000000 --- a/test/doc/transaction-status-2.test +++ /dev/null @@ -1,17 +0,0 @@ -reg --columns=60 food --cleared -<<< -2009/10/31 * Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/01 ! Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/02 Panera Bread - Expenses:Food $4.50 - Assets ->>>1 -09-Oct-31 Panera Bread Expenses:Food $4.50 $4.50 ->>>2 -=== 0 diff --git a/test/doc/transaction-status-3.test b/test/doc/transaction-status-3.test deleted file mode 100644 index 1e6467ef..00000000 --- a/test/doc/transaction-status-3.test +++ /dev/null @@ -1,18 +0,0 @@ -reg --columns=60 food --uncleared -<<< -2009/10/31 * Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/01 ! Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/02 Panera Bread - Expenses:Food $4.50 - Assets ->>>1 -09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 -09-Nov-02 Panera Bread Expenses:Food $4.50 $9.00 ->>>2 -=== 0 diff --git a/test/doc/transaction-status-4.test b/test/doc/transaction-status-4.test deleted file mode 100644 index 5275eec3..00000000 --- a/test/doc/transaction-status-4.test +++ /dev/null @@ -1,17 +0,0 @@ -reg --columns=60 food --pending -<<< -2009/10/31 * Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/01 ! Panera Bread - Expenses:Food $4.50 - Assets - -2009/11/02 Panera Bread - Expenses:Food $4.50 - Assets ->>>1 -09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 ->>>2 -=== 0 diff --git a/test/manual/transaction-codes-1.test b/test/manual/transaction-codes-1.test new file mode 100644 index 00000000..878c5cac --- /dev/null +++ b/test/manual/transaction-codes-1.test @@ -0,0 +1,22 @@ +reg --columns=60 food and code xfer +<<< +2009/10/29 (XFER) Panera Bread + Expenses:Food $4.50 + Assets:Checking + +2009/10/30 (DEP) Pay day! + Assets:Checking $20.00 + Income + +2009/10/30 (XFER) Panera Bread + Expenses:Food $4.50 + Assets:Checking + +2009/10/31 (559385768438A8D7) Panera Bread + Expenses:Food $4.50 + Liabilities:Credit Card +>>>1 +09-Oct-29 Panera Bread Expenses:Food $4.50 $4.50 +09-Oct-30 Panera Bread Expenses:Food $4.50 $9.00 +>>>2 +=== 0 diff --git a/test/manual/transaction-codes-2.test b/test/manual/transaction-codes-2.test new file mode 100644 index 00000000..4e4c76cf --- /dev/null +++ b/test/manual/transaction-codes-2.test @@ -0,0 +1,24 @@ +bal checking --set-reported-account=code +<<< +2009/10/29 (XFER) Panera Bread + Expenses:Food $4.50 + Assets:Checking + +2009/10/30 (DEP) Pay day! + Assets:Checking $20.00 + Income + +2009/10/30 (XFER) Panera Bread + Expenses:Food $4.50 + Assets:Checking + +2009/10/31 (559385768438A8D7) Panera Bread + Expenses:Food $4.50 + Liabilities:Credit Card +>>>1 + $20.00 DEP + $-9.00 XFER +-------------------- + $11.00 +>>>2 +=== 0 diff --git a/test/manual/transaction-notes-1.test b/test/manual/transaction-notes-1.test new file mode 100644 index 00000000..d3fab3b6 --- /dev/null +++ b/test/manual/transaction-notes-1.test @@ -0,0 +1,24 @@ +reg --columns=60 food and note eat +<<< +2009/11/01 Panera Bread ; Got something to eat + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Coffee + ; Let’s see, I ate a whole bunch of stuff, drank some coffee, + ; pondered a bagel, then decided against the donut. + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Dining + ; :Eating: + ; This is another long note, after the metadata. + Expenses:Food $4.50 + Assets:Checking +>>>1 +09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 +09-Nov-01 Panera Bread Expenses:Food $4.50 $9.00 +>>>2 +=== 0 diff --git a/test/manual/transaction-notes-2.test b/test/manual/transaction-notes-2.test new file mode 100644 index 00000000..b7a258e0 --- /dev/null +++ b/test/manual/transaction-notes-2.test @@ -0,0 +1,23 @@ +reg --columns=60 food and tag eating +<<< +2009/11/01 Panera Bread ; Got something to eat + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Coffee + ; Let’s see, I ate a whole bunch of stuff, drank some coffee, + ; pondered a bagel, then decided against the donut. + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Dining + ; :Eating: + ; This is another long note, after the metadata. + Expenses:Food $4.50 + Assets:Checking +>>>1 +09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 +>>>2 +=== 0 diff --git a/test/manual/transaction-notes-3.test b/test/manual/transaction-notes-3.test new file mode 100644 index 00000000..9d532d5f --- /dev/null +++ b/test/manual/transaction-notes-3.test @@ -0,0 +1,23 @@ +reg --columns=60 food and tag type=dining +<<< +2009/11/01 Panera Bread ; Got something to eat + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Coffee + ; Let’s see, I ate a whole bunch of stuff, drank some coffee, + ; pondered a bagel, then decided against the donut. + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Dining + ; :Eating: + ; This is another long note, after the metadata. + Expenses:Food $4.50 + Assets:Checking +>>>1 +09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 +>>>2 +=== 0 diff --git a/test/manual/transaction-notes-4.test b/test/manual/transaction-notes-4.test new file mode 100644 index 00000000..516094c7 --- /dev/null +++ b/test/manual/transaction-notes-4.test @@ -0,0 +1,27 @@ +bal food and tag type --set-reported-account='"Tags:" + tag("Type")' +<<< +2009/11/01 Panera Bread ; Got something to eat + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Coffee + ; Let’s see, I ate a whole bunch of stuff, drank some coffee, + ; pondered a bagel, then decided against the donut. + Expenses:Food $4.50 + Assets:Checking + +2009/11/01 Panera Bread + ; Type: Dining + ; :Eating: + ; This is another long note, after the metadata. + Expenses:Food $4.50 + Assets:Checking +>>>1 + $9.00 Tags + $4.50 Coffee + $4.50 Dining +-------------------- + $9.00 +>>>2 +=== 0 diff --git a/test/manual/transaction-status-1.test b/test/manual/transaction-status-1.test new file mode 100644 index 00000000..4bdf893a --- /dev/null +++ b/test/manual/transaction-status-1.test @@ -0,0 +1,19 @@ +reg --columns=60 food +<<< +2009/10/31 * Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/01 ! Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/02 Panera Bread + Expenses:Food $4.50 + Assets +>>>1 +09-Oct-31 Panera Bread Expenses:Food $4.50 $4.50 +09-Nov-01 Panera Bread Expenses:Food $4.50 $9.00 +09-Nov-02 Panera Bread Expenses:Food $4.50 $13.50 +>>>2 +=== 0 diff --git a/test/manual/transaction-status-2.test b/test/manual/transaction-status-2.test new file mode 100644 index 00000000..dbbb04ae --- /dev/null +++ b/test/manual/transaction-status-2.test @@ -0,0 +1,17 @@ +reg --columns=60 food --cleared +<<< +2009/10/31 * Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/01 ! Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/02 Panera Bread + Expenses:Food $4.50 + Assets +>>>1 +09-Oct-31 Panera Bread Expenses:Food $4.50 $4.50 +>>>2 +=== 0 diff --git a/test/manual/transaction-status-3.test b/test/manual/transaction-status-3.test new file mode 100644 index 00000000..1e6467ef --- /dev/null +++ b/test/manual/transaction-status-3.test @@ -0,0 +1,18 @@ +reg --columns=60 food --uncleared +<<< +2009/10/31 * Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/01 ! Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/02 Panera Bread + Expenses:Food $4.50 + Assets +>>>1 +09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 +09-Nov-02 Panera Bread Expenses:Food $4.50 $9.00 +>>>2 +=== 0 diff --git a/test/manual/transaction-status-4.test b/test/manual/transaction-status-4.test new file mode 100644 index 00000000..5275eec3 --- /dev/null +++ b/test/manual/transaction-status-4.test @@ -0,0 +1,17 @@ +reg --columns=60 food --pending +<<< +2009/10/31 * Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/01 ! Panera Bread + Expenses:Food $4.50 + Assets + +2009/11/02 Panera Bread + Expenses:Food $4.50 + Assets +>>>1 +09-Nov-01 Panera Bread Expenses:Food $4.50 $4.50 +>>>2 +=== 0 diff --git a/tools/Makefile.am b/tools/Makefile.am index 4662e73d..4dd4a871 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -247,7 +247,7 @@ endif TESTS = if HAVE_PYTHON -TESTS += RegressTests BaselineTests DocTests ConfirmTests GenerateTests +TESTS += RegressTests BaselineTests ManualTests ConfirmTests GenerateTests endif if HAVE_CPPUNIT @@ -381,12 +381,12 @@ BaselineTests: $(srcdir)/test/RegressTests.py echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/baseline \"\$$@\"" > $@ chmod 755 $@ -DocTests_SOURCES = test/RegressTests.py +ManualTests_SOURCES = test/RegressTests.py -EXTRA_DIST += test/doc +EXTRA_DIST += test/manual -DocTests: $(srcdir)/test/RegressTests.py - echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/doc \"\$$@\"" > $@ +ManualTests: $(srcdir)/test/RegressTests.py + echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir) $(srcdir)/test/manual \"\$$@\"" > $@ chmod 755 $@ ConfirmTests_SOURCES = test/ConfirmTests.py @@ -432,12 +432,12 @@ endif fullcheck: cppunittests @$(top_builddir)/RegressTests --verify @$(top_builddir)/BaselineTests --verify - @$(top_builddir)/DocTests --verify + @$(top_builddir)/ManualTests --verify @$(top_builddir)/ConfirmTests --verify @$(top_builddir)/GenerateTests --verify @$(top_builddir)/RegressTests --gmalloc @$(top_builddir)/BaselineTests --gmalloc - @$(top_builddir)/DocTests --gmalloc + @$(top_builddir)/ManualTests --gmalloc # @$(top_builddir)/ConfirmTests --gmalloc # @$(top_builddir)/GenerateTests --gmalloc -- cgit v1.2.3