hledger-0.10: A command-line (or curses or web-based) double-entry accounting tool.Source codeContentsIndex
Hledger.Cli.Tests
Description

This module contains hledger's unit tests. These are built in to hledger, and can be run at any time by doing hledger test (or, with a few more options, by doing make unittest in the hledger source tree.)

Other kinds of tests:

hledger's functional tests are a set of shell/command-line tests defined by .test files in the tests/ subdirectory. These can be run by doing make functest in the hledger source tree.

hledger's doctests are shell tests defined in literal blocks in haddock documentation in the source, run by doing make doctest in the hledger source tree. They are no longer used, but here is an example:

$ hledger -f sample.ledger balance o
                  $1  expenses:food
                 $-2  income
                 $-1    gifts
                 $-1    salary
--------------------
                 $-1
Synopsis
runtests :: [Opt] -> [String] -> IO ()
tests :: Test
journalWithAmounts :: [String] -> Journal
Documentation
runtests :: [Opt] -> [String] -> IO ()Source
Run unit tests.
tests :: TestSource
unit tests, augmenting the ones defined in each module. Where that is inconvenient due to import cycles or whatever, we define them here.
journalWithAmounts :: [String] -> JournalSource
Produced by Haddock version 2.6.1