test-book-merge update

Derek Atkins warlord at MIT.EDU
Sun Dec 5 10:34:01 EST 2004


Thanks.  Applied.

-derek

Neil Williams <linux at codehelp.co.uk> writes:

> I fixed a separate bug in qof_book_merge and this is the patch for the test 
> case. I've added a note to explain:
>
>  /* In this test rule_loop, any lines beginning with do_test() can be removed
>  from a working rule_loop routine. It would be wise to still use some of the
>  more obvious checks, e.g. that an entity or rule exists before querying the 
>  parameters.
>  
>  Take particular care with MERGE_NEW - targetEnt is always NULL until the
>  Commit.
>  Do not attempt to use param_getfcn on targetEnt in the loop called by 
>  qof_book_mergeRuleForeach(rule_loop, MERGE_NEW);
>
> This is because the target book cannot be altered until the Commit, so because 
> this entity is new, it doesn't have a target in the book yet - the target 
> entity in the rule is null. At Commit, a new entity is created using the 
> QofObject create: call which initialises it to the defaults. qof_book_merge 
> then updates the new entity with the import data.
>
> For some reason, the first message came back with a bad signature - it also 
> used the wrong date in the filename. Trying again.
>
> (The two are the same patch, just renamed the file.)
>
> -- 
>
> Neil Williams
> =============
> http://www.codehelp.co.uk/
> http://www.dclug.org.uk/
> http://www.isbn.org.uk/
> http://sourceforge.net/projects/isbnsearch/
>
> http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
>
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-patches mailing list