[Gnucash-changes] r13716 - gnucash/trunk/src - factor out grammar check, add tests.

Chris Shoemaker c.shoemaker at cox.net
Thu Mar 30 20:21:28 EST 2006


On Thu, Mar 30, 2006 at 07:03:55PM -0500, Josh Sled wrote:
> On Thu, 2006-03-30 at 16:28 -0500, Chris Shoemaker wrote:
> > value, but please let it print FAILED.
> 
> While it would be nice if our test framework supported tests known not
> to pass, it doesn't.  

But it does.  Just call do_test().  If the test fails, it will print
FAILURE, but it will still pass 'make check'.  We have tests that do
this now.  They just don't end with 'exit(get_rv())'.  However, it's
trivial to change get_rv() to return the number of failures, allowing
a test with known failures to end with, e.g.  'exit(get_rv() > 2)'

I'll look into making this change for the future.

> > p.s. BTW, just a simple "a 0" (no quotes) shows the bug, too.
> 
> No, the problem is specifically with quoted strings.  See the tests on
> lines 131..136, which do pass.

Ok, I guess "a 0" was failing for a different reason then.  But, I
confirm that you've fixed it.  I can't get any random numbers out of
the parser any more.  (It doesn't even seem possible to enter quotes.)
Nice job!  Thanks for fixing this.

BTW, it looks like you're also adding an additional error state to the
parser.  Is that with a view toward being able to report the error in
the register?

-chris

> 
> -- 
> ...jsled
> http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo ${a}@${b}`


More information about the gnucash-devel mailing list