mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 03:13:25 +03:00
;site: stop using pandoc's fenced_code_attributes
[ci skip]
This commit is contained in:
parent
fd5dc7bc18
commit
f55985eb9b
@ -694,7 +694,7 @@ About testing in the hledger project, as of 201809.
|
||||
|
||||
Here\'s the pattern (let us know if you see a better way):
|
||||
|
||||
``` {.haskell}
|
||||
``` haskell
|
||||
module Foo (
|
||||
...
|
||||
tests_Foo -- export this module's and submodules' tests
|
||||
@ -836,19 +836,19 @@ tests, at least. It would be useful to set this up for hledger.
|
||||
|
||||
Run unit tests:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make unittest
|
||||
```
|
||||
|
||||
Run doctests:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make doctest
|
||||
```
|
||||
|
||||
Run functional tests (and unit tests, now):
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ stack install shelltestrunner
|
||||
$ make functest
|
||||
```
|
||||
@ -856,37 +856,37 @@ $ make functest
|
||||
Run the package tests (unit tests, maybe doctests, but not functional
|
||||
tests) of all or selected packages.
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ stack test [PKG]
|
||||
```
|
||||
|
||||
Run \"default tests: package plus functional tests\":
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make test
|
||||
```
|
||||
|
||||
Test generation of haddock docs:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make haddocktest
|
||||
```
|
||||
|
||||
Thorough test for build issues with current GHC:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make buildtest
|
||||
```
|
||||
|
||||
Thorough test for build issues with all supported GHC versions:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make buildtestall
|
||||
```
|
||||
|
||||
Run built-in hledger/hledger-lib unit tests via hledger command:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ hledger test # test installed hledger
|
||||
$ stack build hledger && stack exec -- hledger test # test just-built hledger
|
||||
$ hledger test --help
|
||||
@ -903,19 +903,19 @@ test [TESTPATTERN] [SEED]
|
||||
|
||||
Rebuild and rerun hledger/hledger-lib unit tests via ghcid:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make ghcid-test
|
||||
```
|
||||
|
||||
Rebuild and rerun only some tests via ghcid (see hledger test --help):
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make ghcid-test-TESTPATTERN
|
||||
```
|
||||
|
||||
See all test-related make rules:
|
||||
|
||||
``` {.example}
|
||||
``` example
|
||||
$ make help-test
|
||||
```
|
||||
|
||||
|
2
Shake.hs
2
Shake.hs
@ -117,7 +117,7 @@ fromsrcmd = "-f markdown-smart-tex_math_dollars"
|
||||
-- recommonmark (Commonmark syntax, https://spec.commonmark.org)
|
||||
-- sphinx-markdown-tables (PHP Markdown Extra table syntax, https://michelf.ca/projects/php-markdown/extra/#table)
|
||||
-- XXX trying to force the use of pipe_tables here, but sometimes it uses html instead
|
||||
towebmd = "-t markdown-smart-fenced_divs-simple_tables-multiline_tables-grid_tables --atx-headers"
|
||||
towebmd = "-t markdown-smart-fenced_divs-fenced_code_attributes-simple_tables-multiline_tables-grid_tables --atx-headers"
|
||||
|
||||
|
||||
main = do
|
||||
|
@ -106,22 +106,22 @@ you'll need to specify the format.
|
||||
DATEFMT is a [strptime-like date parsing pattern](http://hackage.haskell.org/packages/archive/time/latest/doc/html/Data-Time-Format.html#v:formatTime),
|
||||
which must parse the date field values completely. Examples:
|
||||
|
||||
``` {.rules .display-table}
|
||||
``` rules
|
||||
# for dates like "11/06/2013":
|
||||
date-format %m/%d/%Y
|
||||
```
|
||||
|
||||
``` {.rules .display-table}
|
||||
``` rules
|
||||
# for dates like "6/11/2013" (note the - to make leading zeros optional):
|
||||
date-format %-d/%-m/%Y
|
||||
```
|
||||
|
||||
``` {.rules .display-table}
|
||||
``` rules
|
||||
# for dates like "2013-Nov-06":
|
||||
date-format %Y-%h-%d
|
||||
```
|
||||
|
||||
``` {.rules .display-table}
|
||||
``` rules
|
||||
# for dates like "11/6/2013 11:32 PM":
|
||||
date-format %-m/%-d/%Y %l:%M %p
|
||||
```
|
||||
@ -152,11 +152,11 @@ This sets a journal entry field (one of the standard names above) to the given t
|
||||
which can include CSV field values interpolated by name (`%CSVFIELDNAME`) or 1-based position (`%N`).
|
||||
<!-- Whitespace before or after the value is ignored. -->
|
||||
Eg:
|
||||
```{.rules .display-table}
|
||||
```rules
|
||||
# set the amount to the 4th CSV field with "USD " prepended
|
||||
amount USD %4
|
||||
```
|
||||
```{.rules .display-table}
|
||||
```rules
|
||||
# combine three fields to make a comment (containing two tags)
|
||||
comment note: %somefield - %anotherfield, date: %1
|
||||
```
|
||||
@ -183,12 +183,12 @@ specific field). When there are multiple patterns they can be written
|
||||
on separate lines, unindented.
|
||||
The field assignments are on separate lines indented by at least one space.
|
||||
Examples:
|
||||
```{.rules .display-table}
|
||||
```rules
|
||||
# if the CSV record contains "groceries", set account2 to "expenses:groceries"
|
||||
if groceries
|
||||
account2 expenses:groceries
|
||||
```
|
||||
```{.rules .display-table}
|
||||
```rules
|
||||
# if the CSV record contains any of these patterns, set account2 and comment as shown
|
||||
if
|
||||
monthly service fee
|
||||
|
@ -403,7 +403,7 @@ double equals sign (`== EXPECTEDBALANCE`).
|
||||
This asserts that there are no other unasserted commodities in the account
|
||||
(or, that their balance is 0).
|
||||
|
||||
``` {.journal}
|
||||
``` journal
|
||||
2013/1/1
|
||||
a $1
|
||||
a 1€
|
||||
@ -423,7 +423,7 @@ This asserts that there are no other unasserted commodities in the account
|
||||
It's not yet possible to make a complete assertion about a balance that has multiple commodities.
|
||||
One workaround is to isolate each commodity into its own subaccount:
|
||||
|
||||
``` {.journal}
|
||||
``` journal
|
||||
2013/1/1
|
||||
a:usd $1
|
||||
a:euro 1€
|
||||
|
@ -37,7 +37,7 @@ some number of hours to an account. Or if the session spans more than
|
||||
one day, it is split into several transactions, one for each day. For
|
||||
the above time log, `hledger print` generates these journal entries:
|
||||
|
||||
``` {.shell}
|
||||
``` shell
|
||||
$ hledger -f t.timeclock print
|
||||
2015/03/30 * optional description after two spaces
|
||||
(some:account name) 0.33h
|
||||
|
Loading…
Reference in New Issue
Block a user