Commit graph

209 commits

Author SHA1 Message Date
John Wiegley
67b9c917e6 Fixed a broken Makefile dependency 2009-03-01 22:43:51 -04:00
John Wiegley
9a23b73491 Move tools/autogen.sh to root of distribution 2009-03-01 01:07:16 -04:00
John Wiegley
e60791dc46 Filter debug info output by GuardMalloc 2009-02-28 06:21:21 -04:00
John Wiegley
4d632903c1 Added LedgerHarness.py, to simplify test creation 2009-02-28 05:37:49 -04:00
John Wiegley
e0f8e36eb4 Removed custom rules relating to TAGS generation 2009-02-28 05:06:42 -04:00
John Wiegley
5e6c95e348 Removed an extraneous addition to EXTRA_DIST 2009-02-27 12:55:51 -04:00
John Wiegley
6b62be59fb Added generate command, --seed, and GenerateTests 2009-02-27 03:58:43 -04:00
John Wiegley
513e2b59eb Fixed a bad option passed to rm in Makefile.am 2009-02-26 04:12:19 -04:00
John Wiegley
d58797e98c The -B, -G, -V reports now show rounding amounts
This way, if the running total is off by a penny or two due to rounding
of one or more commodities in the account, the user will see it.

This commit also reorganizes the testing code a bit, which I did after
adding the ninth test series (ConfirmTests), to validate the new
rounding code.
2009-02-26 03:16:39 -04:00
John Wiegley
9db6e8cdbe Added rm -fr test/python to distclean-local hook 2009-02-25 20:02:53 -04:00
John Wiegley
f33d3f97f6 Made a dependency ref to UnitTest.py explicit 2009-02-25 03:53:46 -04:00
John Wiegley
f745767fa6 Removed reference to test/__init__.py 2009-02-25 02:43:35 -04:00
John Wiegley
e012917ceb Created some new Python scripts under python/ 2009-02-24 19:33:03 -04:00
John Wiegley
1799ed3a2a Moved python/*.cc files into src/
This is because soon, I intend to have real Python source files in
python/.
2009-02-24 16:08:49 -04:00
John Wiegley
d525db35d8 Restored the use of Python unit tests 2009-02-24 13:16:28 -04:00
John Wiegley
07fcc3a08a Build Python module using automake, not setup.py 2009-02-24 12:48:11 -04:00
John Wiegley
9f9381db64 Restored the py_amount and py_balance mappings 2009-02-24 12:41:52 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
9e0d66610c Renamed acconf.h to config.h, for included gettext 2009-02-22 16:21:22 -04:00
John Wiegley
b902894284 Added support for using GNU gettext 2009-02-21 20:21:13 -04:00
John Wiegley
66c5cd4427 Use a "format accumulator" for error strings
This makes it possible to internationalize strings while still using
I/O streams.  For example:

    std::cout << ACCUM(_("Hello to %1 and %2!") << "me" << "you")
              << std::endl;
2009-02-21 20:20:57 -04:00
John Wiegley
1f39d4148e Create a new interactive_t helper class
The purpose of this class is much like Emacs' (interactive) form: it
allows a value expression function to declare exactly how many
arguments, and of what type, it intends to receive.  It then offers
type-safe access to theese arguments in a consistent manner.

An example value expression function definition in C++:

    value_t fn_foo(call_scope_t& scope) {
      // We expect a string, an integer, and an optional date
      interactive_t args(scope, "sl&d");

      std::cout << "String  = " << args.get<string>(0)
                << "Integer = " << args.get<long>(1) << std::endl;

      if (args.has(2)) // was a date provided?
        std::cout << "Date    = " << args.get<date_t>(2) << std::endl;

      return NULL_VALUE;
    }

There is also an in_context_t<T> template, which finds the context type
T in the current scope hierarchy.  The in_context_t then also acts as a
smart pointer to reference this context object, in addition to serving
the same duty as interactive_t.  This combination of intent is solely
for the sake of brevity.

    value_t fn_bar(call_scope_t& scope) {
      in_context_t<account_t> env(scope, "sl&d");
      std::cout << "Account name = " << env->fullname()
                << "String arg   = " << env.get<string>(0)
                << std::endl;
      return NULL_VALUE;
    }

As you can see here, 'env' acts as a smart pointer to the required
context, and an object to extract the typed arguments.
2009-02-21 18:49:43 -04:00
John Wiegley
067f512e94 The --help (-h, -H) options now visit the man page 2009-02-21 16:24:10 -04:00
John Wiegley
37097e6008 Added an automake rule for installing the man page 2009-02-21 14:34:48 -04:00
John Wiegley
740cd8e8f1 Added feature baseline tests
These are like regression tests to confirm the basic functionality of
every Ledger feature.  Also, made the release-distcheck target less
sensitive.
2009-02-20 13:31:01 -04:00
John Wiegley
4365d9e3fc Moved around some functions for clarity 2009-02-16 04:10:22 -04:00
John Wiegley
6f2e3b8864 Properly handle UTF-8 characters in commodity strings. 2009-02-12 02:34:39 -04:00
John Wiegley
9c9320bc58 make clean should remove system.hh.gch from the source tree. 2009-02-12 02:05:01 -04:00
John Wiegley
44518bc640 Wired up the "entry" command from 2.x, though it still needs to be ported. 2009-02-10 22:37:05 -04:00
John Wiegley
3f7104e9be Removed the balance_pair_t type, since it's now an unneeded abstraction.
This type was a holdback from the days before the amount_expr was used
everywhere to determine a transaction's value.
2009-02-09 14:54:42 -04:00
John Wiegley
57b2fc463a Corrected libraries dependencies for some of the unit tests. 2009-02-09 00:27:35 -04:00
John Wiegley
e0b108ff3a Attribute lookup on a Value object which is a Scope now searches the scope. 2009-02-08 21:17:23 -04:00
John Wiegley
ef30354387 Temporarily stub out the Python unit tests. 2009-02-08 19:05:35 -04:00
John Wiegley
cb0faac58d Removed a great many unnecessary Boost.Python files. 2009-02-07 22:49:53 -04:00
John Wiegley
589eabd8e6 Threw away the "multiple parser" infrastructure. 2009-02-07 17:45:48 -04:00
John Wiegley
eb98e0da8b More revision to the way options are handled; reworked CSV command. 2009-02-07 04:26:30 -04:00
John Wiegley
b4ae22b237 Removed an unnecessary variable setting in the Makefile. 2009-02-07 00:04:07 -04:00
John Wiegley
e8d2409430 Removed --reconcile and --reconcile-date. 2009-02-07 00:03:58 -04:00
John Wiegley
ff2f3d23d4 Added stubs for all the Python integration classes. 2009-02-06 14:26:51 -04:00
John Wiegley
54d5d8ada4 Removed the now unused pushvar.h file. 2009-02-06 13:45:26 -04:00
John Wiegley
6aedbf4743 Removed use of sudo in the Makefile. 2009-02-06 00:46:41 -04:00
John Wiegley
7b24e8f8e3 Moved some files around. 2009-02-05 21:18:25 -04:00
John Wiegley
29814cfa7c Removed debugging code from the Makefile. 2009-02-05 04:36:26 -04:00
John Wiegley
edb9cff4a2 Moved work.cc and global_scope_t into a new global.cc file. 2009-02-05 04:20:49 -04:00
John Wiegley
87cfef221a Quiet down the python module build. 2009-02-05 04:20:31 -04:00
John Wiegley
7f5f53de82 Quiet the make output when rebuilding TAGS. 2009-02-05 03:48:56 -04:00
John Wiegley
b9603a1512 Moved ptristream into its own file. 2009-02-04 03:54:29 -04:00
John Wiegley
d53f7d1409 Removed README.textile when building the distribution tarball. 2009-02-03 15:48:53 -04:00
John Wiegley
3434650848 Removed the binary caching code, and the XML, QIF and Gnucash parsers. 2009-02-03 12:22:10 -04:00
John Wiegley
9bdcbffb15 Removed explicit boost suffix from Makefile.am. 2009-02-03 02:23:28 -04:00