Now commodities are checked before accounts, and tags before recentassertions. Also some check doc cleanups.
54 lines
910 B
Plaintext
54 lines
910 B
Plaintext
# * check accounts
|
|
# ** 1. check accounts succeeds when all accounts are declared
|
|
<
|
|
account a
|
|
2020-01-01
|
|
(a) 1
|
|
$ hledger -f- check accounts
|
|
|
|
# ** 2. and otherwise fails:
|
|
<
|
|
2020-01-01
|
|
(a) 1
|
|
$ hledger -f- check accounts
|
|
>2 /account "a" has not been declared/
|
|
>=1
|
|
|
|
# ** 3. also fails for forecast accounts
|
|
<
|
|
commodity $
|
|
account a
|
|
~ 2022-01-31
|
|
a $1
|
|
b
|
|
|
|
$ hledger -f- --today 2022-01-01 --forecast check accounts
|
|
>2 /account "b" has not been declared/
|
|
>=1
|
|
|
|
# ** 4. also fails in --strict mode
|
|
$ hledger -f- --today 2022-01-01 --forecast --strict bal
|
|
>2 /account "b" has not been declared/
|
|
>=1
|
|
|
|
# ** 5. also fails for auto accounts
|
|
<
|
|
commodity $
|
|
account a
|
|
|
|
= a
|
|
(b) $1
|
|
|
|
2022-01-31
|
|
(a) $1
|
|
|
|
2022-02-01
|
|
$ hledger -f- --auto check accounts
|
|
>2 /account "b" has not been declared/
|
|
>=1
|
|
|
|
# ** 6. also fails in --strict mode
|
|
$ hledger -f- --auto --strict bal
|
|
>2 /account "b" has not been declared/
|
|
>=1
|