;journal: tests demonstrating commodity parse errors (#1532)
This commit is contained in:
parent
a8c6a915e4
commit
f58fcd95ab
@ -210,3 +210,47 @@ $ hledger -f - print
|
||||
(a) A 1.122 = A 1.123
|
||||
|
||||
>=
|
||||
|
||||
# Error message when commodity symbols containing non-letters are not quoted. (#1532)
|
||||
|
||||
# 15. Commodity symbol on the left, ending with numbers, could parse successfully
|
||||
# (as "A 12" since space is a valid separator of digit groups).
|
||||
<
|
||||
2021-01-01
|
||||
(a) A1 2
|
||||
|
||||
$ hledger -f- print cur:A amt:12
|
||||
2021-01-01
|
||||
(a) A1 2
|
||||
|
||||
>=
|
||||
|
||||
# 16. Commodity symbol on the left, failing to parse - gives this long error message.
|
||||
<
|
||||
2021-01-01
|
||||
(a) A1B 2
|
||||
|
||||
$ hledger -f- print cur:A1B amt:2
|
||||
>2 /expecting ';', '=', digit, end of input, exponent, ledger-style lot date, ledger-style lot price, newline, space, or transaction price/
|
||||
>=1
|
||||
|
||||
# 17. Commodity symbol on the right, failing to parse - gives this long error message.
|
||||
<
|
||||
2021-01-01
|
||||
(a) 1 A2
|
||||
|
||||
$ hledger -f- print cur:A1 amt:2
|
||||
>2 /expecting ';', '=', end of input, ledger-style lot date, ledger-style lot price, newline, or transaction price/
|
||||
>=1
|
||||
|
||||
# 18. Commodity symbol on the right, beginning with numbers, could parse successfully.
|
||||
<
|
||||
2021-01-01
|
||||
(a) 1 2A
|
||||
|
||||
$ hledger -f- print cur:A amt:12
|
||||
2021-01-01
|
||||
(a) 1 2A
|
||||
|
||||
>=
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user