From c0ad7e34fa06f0e490a03342bc9b02365080b81a Mon Sep 17 00:00:00 2001 From: Michael Budde Date: Thu, 4 Jan 2018 17:45:09 +0100 Subject: Fix segfault when using --market with --group-by `changed_value_posts::create_accounts()` reuses the `` account from `display_filter`, but when clearing `changed_value_posts` `create_accounts()` would be called before the account had been recreated by `display_filter_posts`. This results in a segfault when using the --group-by option. I'm not sure if `display_filter_posts` has the same problem but I reordered the calls there too for good measure. --- test/regress/market-group-by.test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/regress/market-group-by.test (limited to 'test/regress/market-group-by.test') diff --git a/test/regress/market-group-by.test b/test/regress/market-group-by.test new file mode 100644 index 00000000..a0d204aa --- /dev/null +++ b/test/regress/market-group-by.test @@ -0,0 +1,26 @@ +D 1000.00 EUR + +2008/04/15 * Paid expenses back from cie. + Expenses:Cie-Reimbursements 2000 CAD @ 1.10 EUR + Assets:Checking + +2008/04/15 * Paid expenses back from cie. + Expenses:Cie-Reimbursements 2000 USD @ 1.10 EUR + Assets:Checking + +P 2008/04/20 00:00:00 CAD 1.20 EUR +P 2008/04/20 00:00:00 USD 1.20 EUR + +test reg -V --group-by commodity +CAD +08-Apr-15 Paid expenses back .. Exp:Cie-Reimbursements 2200.00 EUR 2200.00 EUR +08-Apr-20 Commodities revalued 200.00 EUR 2400.00 EUR + +EUR +08-Apr-15 Paid expenses back .. Assets:Checking -2200.00 EUR -2200.00 EUR +08-Apr-15 Paid expenses back .. Assets:Checking -2200.00 EUR -4400.00 EUR + +USD +08-Apr-15 Paid expenses back .. Exp:Cie-Reimbursements 2200.00 EUR 2200.00 EUR +08-Apr-20 Commodities revalued 200.00 EUR 2400.00 EUR +end test -- cgit v1.2.3