-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Resources
Alen Šiljak edited this page Dec 22, 2022
·
12 revisions
Resources for the test harness.
This is a comprehensive collection of ledger journal samples. A parser should be able to parse all the provided samples correctly.
The data files are in the tests
subdirectory.
Ledger-cli contains a test harness.
After building, run ctest
.
Ref: Testing With CMake and CTest
Ledger compatibility test suite contains Ledger tests converted to shelltestrunner format.
- Testing chapter in CLI book
Sample syntax:
# Test Ledger
# Multiple tests sample.
# Test 1
$ ledger -f first.ledger bal
>
-20 EUR Assets:Bank:MyBank:Checking
20 EUR Expenses:Food
--------------------
0
# Test 2
$ ledger -f first.ledger reg
>
22-Dec-10 Supermarket Expenses:Food 20 EUR 20 EUR
As:Ban:MyBank:Checking -20 EUR 0