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 --> <!-- to update: make readme -->
<!-- GENERATED: --> <!-- GENERATED: -->
hledger 1.26.99-gc22e9f6cc-20220713 error messages: hledger 1.26.99-g32c7f6300-20220714 error messages:
### accounts ### accounts
``` ```
@ -274,3 +274,24 @@ b:c
Consider changing these account names so their last parts are different. 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

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

View File

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

View File

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

@ -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 Checking for unique account leaf names is enabled, and
account leaf name "c" is not unique. account leaf name "c" is not unique.
.* It appears in these account names, which a/
/
>>>= 1 >>>= 1