summaryrefslogtreecommitdiff
path: root/test/regress
Commit message (Collapse)AuthorAgeFilesLines
...
| * Move garbage-input.dat to test case using itTim Landscheidt2019-01-222-30/+823
| |
* | Ignore null deferred postingsMichael Budde2019-01-231-0/+5
|/ | | | | | | | | | | | | | | | | | All-null transactions (i.e. a transaction where all postings have a null amount) are discarded during parsing and the `xact` object is free'd. But if the transaction contains a deferred posting this results in a use-after-free vulnerability because a reference to the deferred posting is stored in the account object which is later read when deferred postings are applied after parsing is finished. Ignore null deferred postings to prevent this – they should not have any effect any way. Thanks to Cory Duplantis for reporting this issue and providing an initial analysis. Ref TALOS-2017-0304, CVE-2017-2808 Fixes #1723
* Fix parsing issue involving effective datesMartin Michlmayr2019-01-151-0/+12
| | | | | | | | | | | | | | | | | Cory Duplantis reported that "A specially crafted journal file can cause [an] integer underflow resulting in code execution". Cory provided this test case: Expenses:Food:Groceries $ 37.50 ; ] [=2004/01/01] Note the ] that comes before [ after the ;. This issue was reported and described in great detail by Cory Duplantis of Cisco Talos. This issue is known as TALOS-2017-0303 and has been assigned CVE-2017-2807. Cory's description can be found at https://www.talosintelligence.com/vulnerability_reports/TALOS-2017-0303 Fixes #1722
* Add test case for issue #1703Martin Michlmayr2019-01-121-0/+11
| | | | | Add a test case for issue #1703 which John Wiegley fixed in commit 56025cde ("Don't attempt to invert a value if it's already zero").
* Add the test to make sure it works in the future.Pascal Fleury2018-07-181-0/+36
|
* Remove TOK_A_YEAR tokenChristoph Dittmann2018-06-103-2/+30
| | | | | | | | | | | | | | | | This fixes #1626. The tokenizer eagerly classifies 4-digit integers as TOK_A_YEAR tokens. In some contexts such as "every 1000 years", this causes errors. I think the tokenizer does not have enough information available to distinguish between integers and years. After this patch, the tokenizer will always classify integers as TOK_INT tokens. The "has 4 digits" heuristic to determine if an integer is a year is moved to the place where it's actually needed (and it can be slightly more generic there, too).
* Make automated transactions work with assertionsChristoph Dittmann2018-06-091-0/+15
| | | | | | | | | | | | | | | This fixes issue #1127. In my understanding, PR #552 was meant to fix this, but was incomplete. Without this patch, automated transactions are invisible to assertions. This patch fixes this by adding a flag to the account to tell it that there is a new posting, analogous to the behavior of finalize(). I dug up issue #1127 too late to find that this is the same solution proposed by @tbm. Although I wrote this independently, credit goes to Martin Michlmayr (@tbm).
* budget_posts: Keep pending items until the last day they applysmr8942018-04-041-0/+79
|
* Fix handling of edge cases in trim functionMichael Budde2018-01-251-0/+33
| | | | Fixes #520
* Fix segfault when using --market with --group-byMichael Budde2018-01-041-0/+26
| | | | | | | | | | | `changed_value_posts::create_accounts()` reuses the `<Revalued>` 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.
* Merge pull request #494 from jjlee/fix-totalJohn Wiegley2017-10-262-0/+58
|\ | | | | Fix bug where .total used in value exprs breaks totals
| * Fix bug where .total used in value exprs breaks totalsJohn Lee2017-10-262-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Re-initialize (to VOID) totals for the account and its ancestors on adding postings. Otherwise the cache intended for use by recursive calls of C++ function total() in computing family (i.e. account hierarchy) totals is incorrectly retained from one top-level call to the next, causing inconsistent and broken behaviour. * Re-initialize (to false) calculated and gathered. Otherwise we won't e.g. recalculate stale totals for ancestor accounts (e.g. won't recalculate Assets:Savings total if Assets:Savings changes via a posting). Although the value expression total function is used by ledger itself in computing totals, this bug would only appear on use of .total in user-supplied value expressions computed *during parsing* of ledger files, rather than after parsing (I believe ledger only ever calls it for internal purposes after parsing is complete). It is possible this bug also affected other functions than total (perhaps even in circumstances other than analagous to that described in the preceding paragraph). I have not checked that.
* | Merge pull request #484 from mk12/bug-1182-ptrJohn Wiegley2017-10-262-0/+29
|\ \ | |/ |/| Fix Bug 1182: Error message for parse failure after '='
| * Print error message if parsing predicate after '='Mitchell Kember2016-12-202-0/+29
| |
* | Merge pull request #477 from thdox/bug-584-550thdox2017-01-161-0/+73
|\ \ | | | | | | Add regress test for bugs 550 and 584
| * | Add regress test for bugs 550 and 584thdox2017-01-051-0/+73
| |/
* | Merge pull request #476 from thdox/bug-1055thdox2017-01-161-0/+26
|\ \ | | | | | | Add regress test for bug 1055
| * | Add regress test for bug 1055thdox2017-01-051-0/+26
| |/
* / Add regress test for bug 1132thdox2017-01-051-0/+16
|/
* Don't explicitly reference test file in 1057.testJohn Wiegley2016-11-131-1/+1
|
* --force-color does not require anymore --color.thdox2016-10-271-1/+1
| | | | This was reported as Bug #1109
* Fix bug 1187: Allow balance assertions with multiple posts to same accountMitchell Kember2016-10-074-0/+105
|
* Fix regress test 383 on WindowsEvan Mallory2016-10-021-1/+1
| | | | %g is not available in Windows strftime. See documentation at https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx
* Fix test harness to work with msys2Evan Mallory2016-09-231-1/+2
| | | | | | With this change, 97% of the tests pass. See the build on appveyor for more info: https://ci.appveyor.com/project/Evan/ledger/build/build-49 I'll follow up with another PR to fix some of the remaining broken tests
* Fix Bug 1147: Check balance assertions against the amount AFTERMitchell Kember2016-03-222-0/+22
|
* Merge pull request #449 from ppickfor/nextJohn Wiegley2016-03-141-0/+29
|\ | | | | Use interval start date (period from/since) to initialize first period.
| * Periods should be initialized from from/since clause rather than earliest ↵Peter Pickford2016-03-091-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transaction date Bug 1159 Use interval start date (period from/since) to initialize first period. This allows the offset of a period start to be specified -p 'every 12 months from 2000-04-01' will have periods yyyy-04-01 to yyyy-03-31 .... If no from/since is specified for the period the first transaction date reported is used to initialize the period as before. added test case regress/1159.test
* | days - do not stabalize periods spacified in daysPeter Pickford2016-03-135-0/+532
|/ | | | | | | | weeks - calculate start date for finding period using remainer 400/periodlength to reduce number of iterations (perhaps this ought to follow the same conventio as years months and quarters) add sample period command tests add add day period tests for forecasts and budgets add week period tests for forecasts and budgets - these do not change
* Fix test suite failureMartin Michlmayr2016-02-161-1/+1
| | | | | I'm sure I used $FILE for the final version but I must have committed an old version.
* Increase maximum length for regexMartin Michlmayr2016-02-151-0/+28
| | | | Fixes bug #981
* [python] Remove double quotes from unicode valuesAlexis Hildebrandt2016-01-112-0/+17
| | | | | When converting a ledger.Value to unicode the Python API added double quotes around it.
* Always use plurar Expenses: for consistencyMartin Michlmayr2015-12-142-4/+4
|
* [tests] Set timezone for running testsAlexis Hildebrandt2015-08-071-1/+1
| | | | so that the tests run with a consistent environment.
* Merge pull request #424 from thdox/bug-1057John Wiegley2015-08-041-0/+11
|\ | | | | Add regression test file for bug #1057
| * Modification to help fix issue when compiling with travisthdox2015-07-311-1/+1
| | | | | | | | | | -(("/home/travis/build/ledger/ledger/test/regress/1057.test" 1 (21308 34912 0) nil "www.amazon.fr" +(("/home/travis/build/ledger/ledger/test/regress/1057.test" 1 (21308 42112 0) nil "www.amazon.fr"
| * regression test file for bug 1057thdox2015-07-311-0/+11
| |
* | Fix test file regress/25A099C9.test.thdox2015-07-311-33/+51
| |
* | Revert "Disable three tests preventing Jenkins from succeeding"thdox2015-07-311-0/+0
|/ | | | This reverts commit 8d1067c89c1c283accfeebb1ff35276b8eb35749.
* Rename file from test/regress/634AA589.test tothdox2015-01-221-19/+0
| | | | | test/baseline/opt-permissive.test. Actually 634AA589 is the initial commit that created permissive option.
* [fix] Make trim function trim trailing whitespaceAlexis Hildebrandt2015-01-201-0/+11
| | | | | | std::isspace(*e) returns false for the end of c-string null-byte. Bugzilla: 1106
* Fix -i short-option for --init-fileAlexis Hildebrandt2015-01-151-0/+8
| | | | | | Bugfix for #1102 Signed-off-by: Alexis Hildebrandt <afh@surryhill.net>
* Bugfix 1038: empty reg report for this month periodAlexis Hildebrandt2014-12-293-0/+56
| | | | | when year was specified with literal Y or year directive, but not when using apply year.
* Fix crash when using -M with empty resultAlexis Hildebrandt2014-12-161-0/+37
| | | | | | | ledger -f /dev/null reg -M test causes a segmentation fault, see bug 730 and duplicates 1080 and 1084 for details. Kudos to Ikke for helping with debugging.
* Add test case for off by one error in textual.cc fixed in a013a73bMartin Michlmayr2014-12-111-0/+10
|
* Add ISO 8601 date as recognized date stringMartin Michlmayr2014-10-021-0/+31
| | | | | | | | Dates specified via --begin and --end are converted to a value expression using an ISO 8601 (yyyy-mm-dd) date, but this date was not recognized by ledger. Bug fix for #1072
* Fix period expression parsing for month to month without yearMartin Michlmayr2014-10-021-0/+161
| | | | Bug fix for #1074, a regression introduced by the fix for bug #375
* fix regression testJohann Klähn2014-09-101-1/+1
| | | | see pull request #320 / commit 4c8604266580b2
* Add a regression test for bug #712Martin Michlmayr2014-07-142-0/+22
|
* Add regression tests for bug #713Martin Michlmayr2014-07-142-0/+88
|
* Update tests for fix for bug #713Martin Michlmayr2014-07-143-7/+2
| | | | | | | John's fix for bug #713 changes the way basis cost are calculated. The patch also fixes #712, which caused ledger to create automatic Equity:Capital Gains that were not correct. Update the test cases accordingly after verifying the new output.