dev: errors: update tests & readme, now including timeclock test

This commit is contained in:
Simon Michael 2022-07-14 19:00:49 +01:00
parent fc1621e647
commit 5ac8f11853
15 changed files with 56 additions and 21 deletions

View File

@ -109,7 +109,7 @@ Here are some current limitations of hledger's error messages:
<!-- to update: make readme -->
<!-- GENERATED: -->
hledger 1.26.99-gc22e9f6cc-20220713 error messages:
hledger 1.26.99-g32c7f6300-20220714 error messages:
### accounts
```
@ -274,3 +274,24 @@ b:c
Consider changing these account names so their last parts are different.
```
### tcclockouttime
```
hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./tcclockouttime.timeclock:5:1:
| i 2022-01-01 00:01:00
5 | o 2022-01-01 00:00:00
This clockout time (2022-01-01 00:00:00) is earlier than the previous clockin.
Please adjust it to be later than 2022-01-01 00:01:00.
```
### tcorderedactions
```
hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./tcorderedactions.timeclock:8:1:
8 | i 2022-01-01 00:01:00
Expected timeclock o entry but got i.
Only one session may be clocked in at a time, so please alternate i and o.
```

View File

@ -12,4 +12,4 @@ account a
account a ; type:A ; \(L,E,R,X,C,V\)
/
>>>= 1
>>>= 1

View File

@ -10,6 +10,6 @@ and commodity:
this balance was asserted: 1
but the actual balance is: 0
a difference of: 1
.*
/
>>>= 1
Consider viewing this account'/
>>>= 1

View File

@ -7,4 +7,4 @@ This transaction is unbalanced.
The real postings' sum should be 0 but is: 1
Consider adjusting this entry's amounts, or adding missing postings.
/
>>>= 1
>>>= 1

View File

@ -7,6 +7,5 @@ $$$ hledger check balancednoautoconversion -f balancednoautoconversion.j
This multi-commodity transaction is unbalanced.
Automatic commodity conversion is not enabled.
The real postings' sum should be 0 but is: 1 A, -1 B
.*
/
>>>= 1
Consider adjusting this entry's/
>>>= 1

View File

@ -12,4 +12,4 @@ commodity A1000.00
commodity 1.000,00 A
/
>>>= 1
>>>= 1

View File

@ -9,6 +9,5 @@ $$$ hledger check ordereddates -f ordereddates.j
Ordered dates checking is enabled, and this transaction's
date \(2022-01-01\) is out of order with the previous transaction.
.*
/
>>>= 1
Consider/
>>>= 1

View File

@ -7,4 +7,4 @@ $$$ hledger check -f parseable-dates.j
This date is invalid, please correct it: 2022\/1\/32
/
>>>= 1
>>>= 1

View File

@ -8,4 +8,4 @@ This regular expression is malformed, please correct it:
\(
/
>>>= 1
>>>= 1

View File

@ -7,4 +7,4 @@ unexpected newline
expecting date separator or digit
/
>>>= 1
>>>= 1

View File

@ -11,4 +11,4 @@ Consider adding a payee directive. Examples:
payee p
/
>>>= 1
>>>= 1

View File

@ -0,0 +1,9 @@
$$$ hledger check -f tcclockouttime.timeclock
>>>2 /hledger: Error: .*tcclockouttime.timeclock:5:1:
\| i 2022-01-01 00:01:00
5 \| o 2022-01-01 00:00:00
This clockout time \(2022-01-01 00:00:00\) is earlier than the previous clockin.
Please adjust it to be later than 2022-01-01 00:01:00.
/
>>>= 1

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S hledger check -f
#!/usr/bin/env -S hledger check -f
# Clockout time before previous clockin.
i 2022/01/01 00:01:00

View File

@ -0,0 +1,8 @@
$$$ hledger check -f tcorderedactions.timeclock
>>>2 /hledger: Error: .*tcorderedactions.timeclock:8:1:
8 \| i 2022-01-01 00:01:00
Expected timeclock o entry but got i.
Only one session may be clocked in at a time, so please alternate i and o.
/
>>>= 1

View File

@ -9,6 +9,5 @@ $$$ hledger check uniqueleafnames -f uniqueleafnames.j
Checking for unique account leaf names is enabled, and
account leaf name "c" is not unique.
.*
/
>>>= 1
It appears in these account names, which a/
>>>= 1