This commit is contained in:
Craig Earls 2014-12-16 20:30:12 -07:00
commit b6cef4bc50
4 changed files with 40 additions and 3 deletions

View file

@ -5252,7 +5252,7 @@ Say you currently have this posting in your ledger file:
Liabilities:MasterCard $-15.00
@end smallexample
Now it's @samp{2004/4/9}, and you've just eating at @samp{Viva Italiano}
Now it's @samp{2004/4/9}, and you've just eaten at @samp{Viva Italiano}
again. The exact amounts are different, but the overall form is the
same. With the @command{xact} command you can type:

View file

@ -55,7 +55,7 @@
nil
(:eval (format " Ledger-Narrow(%s)" ledger-occur-current-regex))
ledger-occur-mode-map
(if ledger-occur-mode
(if (and ledger-occur-current-regex ledger-occur-mode)
(ledger-occur-refresh)
(ledger-occur-remove-overlays)
(message "Showing all transactions")))

View file

@ -983,7 +983,7 @@ void interval_posts::flush()
sort_posts_by_date());
// Determine the beginning interval by using the earliest post
if (all_posts.front() &&
if (all_posts.size() > 0 && all_posts.front() &&
! interval.find_period(all_posts.front()->date()))
throw_(std::logic_error, _("Failed to find period for interval report"));

37
test/regress/730.test Normal file
View file

@ -0,0 +1,37 @@
; Using -M in combination with an empty result causes a segmentation fault
; therefore this test case does not have or need any test data
test -f /dev/null -M reg
end test
; Tests mentioned in #730
test reg -M
end test
test reg -M .foo
end test
test reg -M -e 2012/01
end test
; Tests mentioned in #1080
test reg '^Expenses' and expr 'any(account =~ /^Assets:Cash/)' --period 'every week this month'
end test
test bal '^Expenses' and expr 'any(account =~ /^Assets:Cash/)' --period 'every week this month'
end test
test bal reg foo and expr 'any(account =~ /bar/)' --period 'every week'
end test
; Tests mentioned in #1084
test b abc -M
end test
test reg foo -M
end test
test bal foo -M
end test