;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):
|
Here\'s the pattern (let us know if you see a better way):
|
||||||
|
|
||||||
``` {.haskell}
|
``` haskell
|
||||||
module Foo (
|
module Foo (
|
||||||
...
|
...
|
||||||
tests_Foo -- export this module's and submodules' tests
|
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:
|
Run unit tests:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make unittest
|
$ make unittest
|
||||||
```
|
```
|
||||||
|
|
||||||
Run doctests:
|
Run doctests:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make doctest
|
$ make doctest
|
||||||
```
|
```
|
||||||
|
|
||||||
Run functional tests (and unit tests, now):
|
Run functional tests (and unit tests, now):
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ stack install shelltestrunner
|
$ stack install shelltestrunner
|
||||||
$ make functest
|
$ make functest
|
||||||
```
|
```
|
||||||
@ -856,37 +856,37 @@ $ make functest
|
|||||||
Run the package tests (unit tests, maybe doctests, but not functional
|
Run the package tests (unit tests, maybe doctests, but not functional
|
||||||
tests) of all or selected packages.
|
tests) of all or selected packages.
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ stack test [PKG]
|
$ stack test [PKG]
|
||||||
```
|
```
|
||||||
|
|
||||||
Run \"default tests: package plus functional tests\":
|
Run \"default tests: package plus functional tests\":
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make test
|
$ make test
|
||||||
```
|
```
|
||||||
|
|
||||||
Test generation of haddock docs:
|
Test generation of haddock docs:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make haddocktest
|
$ make haddocktest
|
||||||
```
|
```
|
||||||
|
|
||||||
Thorough test for build issues with current GHC:
|
Thorough test for build issues with current GHC:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make buildtest
|
$ make buildtest
|
||||||
```
|
```
|
||||||
|
|
||||||
Thorough test for build issues with all supported GHC versions:
|
Thorough test for build issues with all supported GHC versions:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make buildtestall
|
$ make buildtestall
|
||||||
```
|
```
|
||||||
|
|
||||||
Run built-in hledger/hledger-lib unit tests via hledger command:
|
Run built-in hledger/hledger-lib unit tests via hledger command:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ hledger test # test installed hledger
|
$ hledger test # test installed hledger
|
||||||
$ stack build hledger && stack exec -- hledger test # test just-built hledger
|
$ stack build hledger && stack exec -- hledger test # test just-built hledger
|
||||||
$ hledger test --help
|
$ hledger test --help
|
||||||
@ -903,19 +903,19 @@ test [TESTPATTERN] [SEED]
|
|||||||
|
|
||||||
Rebuild and rerun hledger/hledger-lib unit tests via ghcid:
|
Rebuild and rerun hledger/hledger-lib unit tests via ghcid:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make ghcid-test
|
$ make ghcid-test
|
||||||
```
|
```
|
||||||
|
|
||||||
Rebuild and rerun only some tests via ghcid (see hledger test --help):
|
Rebuild and rerun only some tests via ghcid (see hledger test --help):
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make ghcid-test-TESTPATTERN
|
$ make ghcid-test-TESTPATTERN
|
||||||
```
|
```
|
||||||
|
|
||||||
See all test-related make rules:
|
See all test-related make rules:
|
||||||
|
|
||||||
``` {.example}
|
``` example
|
||||||
$ make help-test
|
$ 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)
|
-- recommonmark (Commonmark syntax, https://spec.commonmark.org)
|
||||||
-- sphinx-markdown-tables (PHP Markdown Extra table syntax, https://michelf.ca/projects/php-markdown/extra/#table)
|
-- 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
|
-- 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
|
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),
|
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:
|
which must parse the date field values completely. Examples:
|
||||||
|
|
||||||
``` {.rules .display-table}
|
``` rules
|
||||||
# for dates like "11/06/2013":
|
# for dates like "11/06/2013":
|
||||||
date-format %m/%d/%Y
|
date-format %m/%d/%Y
|
||||||
```
|
```
|
||||||
|
|
||||||
``` {.rules .display-table}
|
``` rules
|
||||||
# for dates like "6/11/2013" (note the - to make leading zeros optional):
|
# for dates like "6/11/2013" (note the - to make leading zeros optional):
|
||||||
date-format %-d/%-m/%Y
|
date-format %-d/%-m/%Y
|
||||||
```
|
```
|
||||||
|
|
||||||
``` {.rules .display-table}
|
``` rules
|
||||||
# for dates like "2013-Nov-06":
|
# for dates like "2013-Nov-06":
|
||||||
date-format %Y-%h-%d
|
date-format %Y-%h-%d
|
||||||
```
|
```
|
||||||
|
|
||||||
``` {.rules .display-table}
|
``` rules
|
||||||
# for dates like "11/6/2013 11:32 PM":
|
# for dates like "11/6/2013 11:32 PM":
|
||||||
date-format %-m/%-d/%Y %l:%M %p
|
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`).
|
which can include CSV field values interpolated by name (`%CSVFIELDNAME`) or 1-based position (`%N`).
|
||||||
<!-- Whitespace before or after the value is ignored. -->
|
<!-- Whitespace before or after the value is ignored. -->
|
||||||
Eg:
|
Eg:
|
||||||
```{.rules .display-table}
|
```rules
|
||||||
# set the amount to the 4th CSV field with "USD " prepended
|
# set the amount to the 4th CSV field with "USD " prepended
|
||||||
amount USD %4
|
amount USD %4
|
||||||
```
|
```
|
||||||
```{.rules .display-table}
|
```rules
|
||||||
# combine three fields to make a comment (containing two tags)
|
# combine three fields to make a comment (containing two tags)
|
||||||
comment note: %somefield - %anotherfield, date: %1
|
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.
|
on separate lines, unindented.
|
||||||
The field assignments are on separate lines indented by at least one space.
|
The field assignments are on separate lines indented by at least one space.
|
||||||
Examples:
|
Examples:
|
||||||
```{.rules .display-table}
|
```rules
|
||||||
# if the CSV record contains "groceries", set account2 to "expenses:groceries"
|
# if the CSV record contains "groceries", set account2 to "expenses:groceries"
|
||||||
if groceries
|
if groceries
|
||||||
account2 expenses:groceries
|
account2 expenses:groceries
|
||||||
```
|
```
|
||||||
```{.rules .display-table}
|
```rules
|
||||||
# if the CSV record contains any of these patterns, set account2 and comment as shown
|
# if the CSV record contains any of these patterns, set account2 and comment as shown
|
||||||
if
|
if
|
||||||
monthly service fee
|
monthly service fee
|
||||||
|
|||||||
@ -403,7 +403,7 @@ double equals sign (`== EXPECTEDBALANCE`).
|
|||||||
This asserts that there are no other unasserted commodities in the account
|
This asserts that there are no other unasserted commodities in the account
|
||||||
(or, that their balance is 0).
|
(or, that their balance is 0).
|
||||||
|
|
||||||
``` {.journal}
|
``` journal
|
||||||
2013/1/1
|
2013/1/1
|
||||||
a $1
|
a $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.
|
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:
|
One workaround is to isolate each commodity into its own subaccount:
|
||||||
|
|
||||||
``` {.journal}
|
``` journal
|
||||||
2013/1/1
|
2013/1/1
|
||||||
a:usd $1
|
a:usd $1
|
||||||
a:euro 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
|
one day, it is split into several transactions, one for each day. For
|
||||||
the above time log, `hledger print` generates these journal entries:
|
the above time log, `hledger print` generates these journal entries:
|
||||||
|
|
||||||
``` {.shell}
|
``` shell
|
||||||
$ hledger -f t.timeclock print
|
$ hledger -f t.timeclock print
|
||||||
2015/03/30 * optional description after two spaces
|
2015/03/30 * optional description after two spaces
|
||||||
(some:account name) 0.33h
|
(some:account name) 0.33h
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user