From 4ab55b37575256cea8cce5f6a246f3af9efb1f48 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 26 Mar 2024 10:12:46 -1000 Subject: [PATCH] ;dev: update error message tests --- hledger/test/errors/README.md | 43 +++++++++---------- hledger/test/errors/accounts.test | 8 ++-- hledger/test/errors/assertions.test | 14 +++--- hledger/test/errors/autobalanced.test | 8 ++-- hledger/test/errors/balanced.j | 7 ++- hledger/test/errors/balanced.test | 12 +++--- hledger/test/errors/commodities.test | 8 ++-- hledger/test/errors/csvamountonenonzero.test | 8 ++-- hledger/test/errors/csvamountparse.test | 8 ++-- hledger/test/errors/csvbalanceparse.test | 8 ++-- hledger/test/errors/csvbalancetypeparse.test | 8 ++-- hledger/test/errors/csvdateformat.test | 2 - hledger/test/errors/csvdateparse.test | 8 ++-- hledger/test/errors/csvdaterule.test | 8 ++-- hledger/test/errors/csvdecimalmarkparse.test | 8 ++-- hledger/test/errors/csvifblocknonempty.test | 8 ++-- hledger/test/errors/csviftablefieldnames.test | 8 ++-- hledger/test/errors/csviftablenonempty.test | 8 ++-- hledger/test/errors/csviftablevaluecount.test | 8 ++-- hledger/test/errors/csvnoinclude.test | 8 ++-- hledger/test/errors/csvskipvalue.test | 8 ++-- hledger/test/errors/csvstatusparse.test | 8 ++-- hledger/test/errors/csvstdinrules.test | 8 ++-- hledger/test/errors/csvtwofields.test | 8 ++-- hledger/test/errors/ordereddates.test | 8 ++-- hledger/test/errors/parseable-regexps.test | 8 ++-- hledger/test/errors/parseable.test | 8 ++-- hledger/test/errors/payees.test | 8 ++-- hledger/test/errors/recentassertions.test | 34 +++++---------- hledger/test/errors/tcclockouttime.test | 8 ++-- hledger/test/errors/tcorderedactions.test | 8 ++-- hledger/test/errors/uniqueleafnames.test | 8 ++-- 32 files changed, 122 insertions(+), 198 deletions(-) diff --git a/hledger/test/errors/README.md b/hledger/test/errors/README.md index 1e71430d0..8d7272f99 100644 --- a/hledger/test/errors/README.md +++ b/hledger/test/errors/README.md @@ -156,7 +156,7 @@ Click error names to see an example. The table headings mean: -hledger 1.26.99-ge777ae46f-20220803 error messages: +hledger 1.32.99-g4dbd417c9-20240326 error messages: ### accounts ``` @@ -181,15 +181,13 @@ hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./assertions.j:4:8: 4 | a 0 = 1 | ^^^ -This balance assertion failed. -In account: a -and commodity: -this balance was asserted: 1 -but the calculated balance is: 0 - -To troubleshoot, you can view this account's running balance. Eg: - -hledger reg 'a$' cur: -I # -f FILE +Balance assertion failed in a +In commodity "" at this point, excluding subaccounts, ignoring costs, +the asserted balance is: 1 +but the calculated balance is: 0 +(difference: 1) +To troubleshoot, check this account's running balance with assertions disabled, eg: +hledger reg -I 'a$' cur: ``` @@ -207,8 +205,8 @@ Consider adjusting this entry's amounts, or adding missing postings. ### balanced ``` -hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./balanced.j:6-8: -6 | 2022-01-01 +hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./balanced.j:5-7: +5 | 2022-01-01 | a 1 A | b -1 B @@ -259,7 +257,7 @@ hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./parseable-dates.j 3 | 2022/1/32 | ^^^^^^^^^ -This date is invalid, please correct it: 2022/1/32 +This is not a valid date, please fix it. ``` @@ -303,21 +301,20 @@ payee p ### recentassertions ``` -hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./recentassertions.j:5:8: - | 2022-01-01 * -5 | a 0 = 0 - | ^^^ +hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./recentassertions.j:11: + | 2022-01-09 bad1 +11 | a 0 + | ^ The recentassertions check is enabled, so accounts with balance assertions must -have a balance assertion no more than 7 days before their latest posting date. -In account a, -the last balance assertion (2022-01-01) was 8 days before -the latest posting (2022-01-09). +have a balance assertion within 7 days of their latest posting. +In account "a", this posting is 8 days later +than the last balance assertion, which was on 2022-01-01. Consider adding a more recent balance assertion for this account. Eg: -2022-08-03 * - a $0 = $0 ; <- adjust +2024-03-26 + a 0 = 0 ; (adjust asserted amount) ``` diff --git a/hledger/test/errors/accounts.test b/hledger/test/errors/accounts.test index 72e3432f7..b31160c65 100644 --- a/hledger/test/errors/accounts.test +++ b/hledger/test/errors/accounts.test @@ -1,7 +1,5 @@ -# * accounts error -# ** 1. -$ hledger check accounts -f accounts.j ->2 /hledger: Error: .*accounts.j:4: +$$$ hledger check accounts -f accounts.j +>>>2 /hledger: Error: .*accounts.j:4: \| 2022-01-01 4 \| \(a\) 1 \| \^ @@ -14,4 +12,4 @@ account a account a ; type:A ; \(L,E,R,X,C,V\) / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/assertions.test b/hledger/test/errors/assertions.test index 112dcb25f..ef2a7b100 100644 --- a/hledger/test/errors/assertions.test +++ b/hledger/test/errors/assertions.test @@ -1,8 +1,6 @@ -# * assertions error -# ** 1. -$ hledger check -f assertions.j ->2 /hledger: Error: .*assertions.j:4:8: -.* +$$$ hledger check -f assertions.j +>>>2 /hledger: Error: .*assertions.j:4:8: + \| 2022-01-01 4 \| a 0 = 1 \| \^\^\^ @@ -10,7 +8,5 @@ Balance assertion failed in a In commodity "" at this point, excluding subaccounts, ignoring costs, the asserted balance is: 1 but the calculated balance is: 0 -\(difference: 1\) -/ ->= 1 - +\(difference: / +>>>= 1 diff --git a/hledger/test/errors/autobalanced.test b/hledger/test/errors/autobalanced.test index b8b7aa168..61136c6f7 100644 --- a/hledger/test/errors/autobalanced.test +++ b/hledger/test/errors/autobalanced.test @@ -1,7 +1,5 @@ -# * autobalanced error -# ** 1. -$ hledger check -f autobalanced.j ->2 /hledger: Error: .*autobalanced.j:3-4: +$$$ hledger check -f autobalanced.j +>>>2 /hledger: Error: .*autobalanced.j:3-4: 3 \| 2022-01-01 \| a 1 @@ -9,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 diff --git a/hledger/test/errors/balanced.j b/hledger/test/errors/balanced.j index 9387d002c..2f28abf88 100755 --- a/hledger/test/errors/balanced.j +++ b/hledger/test/errors/balanced.j @@ -1,7 +1,6 @@ -#!/usr/bin/env -S hledger check balancednoautoconversion -f -# Show the error when balancedwithautoconversion is required -# and an implicit commodity conversion is found. -# Currently the same as the regular balancedwithautoconversion error. +#!/usr/bin/env -S hledger check balanced -f +# Show the error when explicit conversion is required ("balanced") +# but an implicit commodity conversion is found. 2022/1/1 a 1 A diff --git a/hledger/test/errors/balanced.test b/hledger/test/errors/balanced.test index 6d1ceb310..350ec88f0 100644 --- a/hledger/test/errors/balanced.test +++ b/hledger/test/errors/balanced.test @@ -1,13 +1,11 @@ -# * balanced error -# ** 1. -$ hledger check balanced -f balanced.j ->2 /hledger: Error: .*balanced.j:6-8: -6 \| 2022-01-01 +$$$ hledger check balanced -f balanced.j +>>>2 /hledger: Error: .*balanced.j:5-7: +5 \| 2022-01-01 \| a 1 A \| b -1 B 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 -Consider adjusting this entry's/ ->= 1 +Consider adjusting this entry's amounts, adding/ +>>>= 1 diff --git a/hledger/test/errors/commodities.test b/hledger/test/errors/commodities.test index d6a29eca4..aa038c444 100644 --- a/hledger/test/errors/commodities.test +++ b/hledger/test/errors/commodities.test @@ -1,7 +1,5 @@ -# * commodities error -# ** 1. -$ hledger check commodities -f commodities.j ->2 /hledger: Error: .*commodities.j:6: +$$$ hledger check commodities -f commodities.j +>>>2 /hledger: Error: .*commodities.j:6: \| 2022-01-01 6 \| \(a\) A 1 \| \^\^\^ @@ -14,4 +12,4 @@ commodity A1000.00 commodity 1.000,00 A / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvamountonenonzero.test b/hledger/test/errors/csvamountonenonzero.test index 4c0d7f0dc..1ab7b0bbe 100644 --- a/hledger/test/errors/csvamountonenonzero.test +++ b/hledger/test/errors/csvamountonenonzero.test @@ -1,7 +1,5 @@ -# * csvamountonenonzero error -# ** 1. -$ hledger check -f csvamountonenonzero.csv ->2 /hledger: Error: in CSV rules: +$$$ hledger check -f csvamountonenonzero.csv +>>>2 /hledger: Error: in CSV rules: While processing CSV record: "2022-01-03","1","2" while calculating amount for posting 1 rule "amount-in %2" assigned value "1" @@ -9,4 +7,4 @@ rule "amount-out %3" assigned value "2" Multiple non-zero amounts were assigned for an amount field. Please ensure just one non-zero amount i/ ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvamountparse.test b/hledger/test/errors/csvamountparse.test index 9b1cce854..f0a847400 100644 --- a/hledger/test/errors/csvamountparse.test +++ b/hledger/test/errors/csvamountparse.test @@ -1,7 +1,5 @@ -# * csvamountparse error -# ** 1. -$ hledger check -f csvamountparse.csv ->2 /hledger: Error: error: could not parse "badamount" as an amount +$$$ hledger check -f csvamountparse.csv +>>>2 /hledger: Error: error: could not parse "badamount" as an amount CSV record: "2022-01-03","badamount" the amount rule is: %2 the date rule is: %1 @@ -14,4 +12,4 @@ unexpected end of input expecting '\+', '-', or number you may need to change your am/ ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvbalanceparse.test b/hledger/test/errors/csvbalanceparse.test index 3a1acd6f8..e10d51118 100644 --- a/hledger/test/errors/csvbalanceparse.test +++ b/hledger/test/errors/csvbalanceparse.test @@ -1,7 +1,5 @@ -# * csvbalanceparse error -# ** 1. -$ hledger check -f csvbalanceparse.csv ->2 /hledger: Error: error: could not parse "badbalance" as balance1 amount +$$$ hledger check -f csvbalanceparse.csv +>>>2 /hledger: Error: error: could not parse "badbalance" as balance1 amount CSV record: "2022-01-03","badbalance" the balance rule is: %2 the date rule is: %1 @@ -15,4 +13,4 @@ expecting '\+', '-', or number / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvbalancetypeparse.test b/hledger/test/errors/csvbalancetypeparse.test index 1494484f6..9647f92d3 100644 --- a/hledger/test/errors/csvbalancetypeparse.test +++ b/hledger/test/errors/csvbalancetypeparse.test @@ -1,11 +1,9 @@ -# * csvbalancetypeparse error -# ** 1. -$ hledger check -f csvbalancetypeparse.csv ->2 /hledger: Error: balance-type "badtype" is invalid. Use =, ==, =\* or ==\*. +$$$ hledger check -f csvbalancetypeparse.csv +>>>2 /hledger: Error: balance-type "badtype" is invalid. Use =, ==, =\* or ==\*. CSV record: "2022-01-01","1" the balance rule is: %2 the date rule is: %1 / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvdateformat.test b/hledger/test/errors/csvdateformat.test index 67282ee6a..e1348d5f1 100644 --- a/hledger/test/errors/csvdateformat.test +++ b/hledger/test/errors/csvdateformat.test @@ -1,5 +1,3 @@ -# * csvdateformat error -# ** 1. $$$ hledger print -f csvdateformat.csv >>>2 /hledger: Error: error: could not parse "a" as a date using date format "YYYY\/M\/D", "YYYY-M-D" or "YYYY.M.D" CSV record: "a","b" diff --git a/hledger/test/errors/csvdateparse.test b/hledger/test/errors/csvdateparse.test index 6e09ca8e5..b5a605416 100644 --- a/hledger/test/errors/csvdateparse.test +++ b/hledger/test/errors/csvdateparse.test @@ -1,10 +1,8 @@ -# * csvdateparse error -# ** 1. -$ hledger check -f csvdateparse.csv ->2 /hledger: Error: error: could not parse "baddate" as a date using date format "%Y-%m-%d" +$$$ hledger check -f csvdateparse.csv +>>>2 /hledger: Error: error: could not parse "baddate" as a date using date format "%Y-%m-%d" CSV record: "baddate","b" the date rule is: %1 the date-format is: %Y-%m-%d you may need to change your date rule, change your date-format rule, or change your skip rule for m\/d\/y or d\/m\/y dates, use date-f/ ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvdaterule.test b/hledger/test/errors/csvdaterule.test index 7cd4539ca..2419a021d 100644 --- a/hledger/test/errors/csvdaterule.test +++ b/hledger/test/errors/csvdaterule.test @@ -1,8 +1,6 @@ -# * csvdaterule error -# ** 1. -$ hledger check -f csvdaterule.csv ->2 /hledger: Error: offset=0: +$$$ hledger check -f csvdaterule.csv +>>>2 /hledger: Error: offset=0: Please specify \(at top level\) the date field. Eg: date %1 / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvdecimalmarkparse.test b/hledger/test/errors/csvdecimalmarkparse.test index 5bbe1e88f..0ed46520b 100644 --- a/hledger/test/errors/csvdecimalmarkparse.test +++ b/hledger/test/errors/csvdecimalmarkparse.test @@ -1,6 +1,4 @@ -# * csvdecimalmarkparse error -# ** 1. -$ hledger check -f csvdecimalmarkparse.csv ->2 /hledger: Error: decimal-mark's argument should be "." or "," \(not "badmark"\) +$$$ hledger check -f csvdecimalmarkparse.csv +>>>2 /hledger: Error: decimal-mark's argument should be "." or "," \(not "badmark"\) / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvifblocknonempty.test b/hledger/test/errors/csvifblocknonempty.test index 179a1f294..9e6d16080 100644 --- a/hledger/test/errors/csvifblocknonempty.test +++ b/hledger/test/errors/csvifblocknonempty.test @@ -1,7 +1,5 @@ -# * csvifblocknonempty error -# ** 1. -$ hledger check -f csvifblocknonempty.csv ->2 /hledger: Error: .*csvifblocknonempty.csv.rules:2:1: +$$$ hledger check -f csvifblocknonempty.csv +>>>2 /hledger: Error: .*csvifblocknonempty.csv.rules:2:1: \| 2 \| if foo \| \^ @@ -9,4 +7,4 @@ start of conditional block found, but no assignment rules afterward \(assignment rules in a conditional block should be indented\) / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csviftablefieldnames.test b/hledger/test/errors/csviftablefieldnames.test index d1ff14caf..bac26db57 100644 --- a/hledger/test/errors/csviftablefieldnames.test +++ b/hledger/test/errors/csviftablefieldnames.test @@ -1,10 +1,8 @@ -# * csviftablefieldnames error -# ** 1. -$ hledger check -f csviftablefieldnames.csv ->2 /hledger: Error: .*csviftablefieldnames.csv.rules:2:9: +$$$ hledger check -f csviftablefieldnames.csv +>>>2 /hledger: Error: .*csviftablefieldnames.csv.rules:2:9: \| 2 \| if,date,nosuchfield,description \| \^\^\^\^\^\^\^\^\^\^\^\^ unexpected "nosuchfield," expecting "account1", "account10", "account11", "account12", "account13", "account14", "account15", "account16", "account17", "account18", "/ ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csviftablenonempty.test b/hledger/test/errors/csviftablenonempty.test index a804dea38..611b283c5 100644 --- a/hledger/test/errors/csviftablenonempty.test +++ b/hledger/test/errors/csviftablenonempty.test @@ -1,11 +1,9 @@ -# * csviftablenonempty error -# ** 1. -$ hledger check -f csviftablenonempty.csv ->2 /hledger: Error: .*csviftablenonempty.csv.rules:2:1: +$$$ hledger check -f csviftablenonempty.csv +>>>2 /hledger: Error: .*csviftablenonempty.csv.rules:2:1: \| 2 \| if,date,description,comment \| \^ start of conditional table found, but no assignment rules afterward / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csviftablevaluecount.test b/hledger/test/errors/csviftablevaluecount.test index 47252d853..ec890c172 100644 --- a/hledger/test/errors/csviftablevaluecount.test +++ b/hledger/test/errors/csviftablevaluecount.test @@ -1,11 +1,9 @@ -# * csviftablevaluecount error -# ** 1. -$ hledger check -f csviftablevaluecount.csv ->2 /hledger: Error: .*csviftablevaluecount.csv.rules:4:1: +$$$ hledger check -f csviftablevaluecount.csv +>>>2 /hledger: Error: .*csviftablevaluecount.csv.rules:4:1: \| 4 \| one,val1 \| \^ line of conditional table should have 2 values, but this one has only 1 / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvnoinclude.test b/hledger/test/errors/csvnoinclude.test index ba014f6b0..58208a4de 100644 --- a/hledger/test/errors/csvnoinclude.test +++ b/hledger/test/errors/csvnoinclude.test @@ -1,6 +1,4 @@ -# * csvnoinclude error -# ** 1. -$ hledger check -f csvnoinclude.j ->2 /hledger: Error: sorry, CSV files can't be included yet +$$$ hledger check -f csvnoinclude.j +>>>2 /hledger: Error: sorry, CSV files can't be included yet / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvskipvalue.test b/hledger/test/errors/csvskipvalue.test index c5d440907..2e4be3641 100644 --- a/hledger/test/errors/csvskipvalue.test +++ b/hledger/test/errors/csvskipvalue.test @@ -1,6 +1,4 @@ -# * csvskipvalue error -# ** 1. -$ hledger check -f csvskipvalue.csv ->2 /hledger: Error: could not parse skip value: "badval" +$$$ hledger check -f csvskipvalue.csv +>>>2 /hledger: Error: could not parse skip value: "badval" / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvstatusparse.test b/hledger/test/errors/csvstatusparse.test index 15745e7cf..17022c5aa 100644 --- a/hledger/test/errors/csvstatusparse.test +++ b/hledger/test/errors/csvstatusparse.test @@ -1,7 +1,5 @@ -# * csvstatusparse error -# ** 1. -$ hledger print -f csvstatusparse.csv ->2 /hledger: Error: error: could not parse "badstatus" as a cleared status \(should be \*, ! or empty\) +$$$ hledger print -f csvstatusparse.csv +>>>2 /hledger: Error: error: could not parse "badstatus" as a cleared status \(should be \*, ! or empty\) the parse error is: 1:1: \| 1 \| badstatus @@ -11,4 +9,4 @@ expecting '!', '\*', or end of input / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvstdinrules.test b/hledger/test/errors/csvstdinrules.test index 643d06df6..bb598c777 100644 --- a/hledger/test/errors/csvstdinrules.test +++ b/hledger/test/errors/csvstdinrules.test @@ -1,6 +1,4 @@ -# * csvstdinrules error -# ** 1. -$ sh csvstdinrules.sh ->2 /hledger: Error: please use --rules-file when reading CSV from stdin +$$$ sh csvstdinrules.sh +>>>2 /hledger: Error: please use --rules-file when reading CSV from stdin / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/csvtwofields.test b/hledger/test/errors/csvtwofields.test index d759c82d6..9ab83b90b 100644 --- a/hledger/test/errors/csvtwofields.test +++ b/hledger/test/errors/csvtwofields.test @@ -1,6 +1,4 @@ -# * csvtwofields error -# ** 1. -$ hledger check -f csvtwofields.csv ->2 /hledger: Error: CSV record \["b"\] has less than two fields +$$$ hledger check -f csvtwofields.csv +>>>2 /hledger: Error: CSV record \["b"\] has less than two fields / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/ordereddates.test b/hledger/test/errors/ordereddates.test index 83980d2e6..281a522e5 100644 --- a/hledger/test/errors/ordereddates.test +++ b/hledger/test/errors/ordereddates.test @@ -1,7 +1,5 @@ -# * ordereddates error -# ** 1. -$ hledger check ordereddates -f ordereddates.j ->2 /hledger: Error: .*ordereddates.j:10: +$$$ hledger check ordereddates -f ordereddates.j +>>>2 /hledger: Error: .*ordereddates.j:10: 7 \| 2022-01-02 p \| \(a\) 1 @@ -12,4 +10,4 @@ $ 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. Consider/ ->= 1 +>>>= 1 diff --git a/hledger/test/errors/parseable-regexps.test b/hledger/test/errors/parseable-regexps.test index ebcd626ab..cb7aa167f 100644 --- a/hledger/test/errors/parseable-regexps.test +++ b/hledger/test/errors/parseable-regexps.test @@ -1,7 +1,5 @@ -# * parseable error -# ** 1. -$ hledger check -f parseable-regexps.j ->2 /hledger: Error: .*parseable-regexps.j:3:8: +$$$ hledger check -f parseable-regexps.j +>>>2 /hledger: Error: .*parseable-regexps.j:3:8: \| 3 \| alias \/\(\/ = a \| \^ @@ -10,4 +8,4 @@ This regular expression is malformed, please correct it: \( / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/parseable.test b/hledger/test/errors/parseable.test index dab5c16ce..648860fd0 100644 --- a/hledger/test/errors/parseable.test +++ b/hledger/test/errors/parseable.test @@ -1,7 +1,5 @@ -# * parseable error -# ** 1. -$ hledger check -f parseable.j ->2 /hledger: Error: .*parseable.j:3:2: +$$$ hledger check -f parseable.j +>>>2 /hledger: Error: .*parseable.j:3:2: \| 3 \| 1 \| \^ @@ -9,4 +7,4 @@ unexpected newline expecting date separator or digit / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/payees.test b/hledger/test/errors/payees.test index 4961760ec..5dc44aeed 100644 --- a/hledger/test/errors/payees.test +++ b/hledger/test/errors/payees.test @@ -1,7 +1,5 @@ -# * payees error -# ** 1. -$ hledger check payees -f payees.j ->2 /hledger: Error: .*payees.j:6: +$$$ hledger check payees -f payees.j +>>>2 /hledger: Error: .*payees.j:6: 6 \| 2022-01-01 p \| \^ \| \(a\) A 1 @@ -13,4 +11,4 @@ Consider adding a payee directive. Examples: payee p / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/recentassertions.test b/hledger/test/errors/recentassertions.test index e31ab8336..9ac6b68bd 100644 --- a/hledger/test/errors/recentassertions.test +++ b/hledger/test/errors/recentassertions.test @@ -1,23 +1,11 @@ -# * check recentassertions errorsrecentassertions error -# ** 1. The first posting more than 7 days after latest balance assertion causes this check to fail. -$ hledger check recentassertions -f recentassertions.j ->2 /Error: .*recentassertions.j:11: - | 2022-01-09 bad1 -11 | a 0 - | \^ -/ ->= 1 -# -#The recentassertions check is enabled, so accounts with balance assertions must -#have a balance assertion within 7 days of their latest posting. -#In account "a", the above posting is 8 days later -#than the last balance assertion, which was on 2022-01-01. -# -#Consider adding a more recent balance assertion for this account. Eg: -# -#....-..-.. -# a \$0 = \$0 ; \(adjust asserted amount\) -#/ -#>= 1 -# XXX shelltestrunner: "ERROR: please avoid regexps larger than 300 characters, they trigger a memory leak in regex-tdfa". -# Still true ? +$$$ hledger check recentassertions -f recentassertions.j +>>>2 /hledger: Error: .*recentassertions.j:11: + \| 2022-01-09 bad1 +11 \| a 0 + \| \^ + +The recentassertions check is enabled, so accounts with balance assertions must +have a balance assertion within 7 days of their latest posting. +In account "a", this posting is 8 days later +than t/ +>>>= 1 diff --git a/hledger/test/errors/tcclockouttime.test b/hledger/test/errors/tcclockouttime.test index a24e9221e..26ec46d00 100644 --- a/hledger/test/errors/tcclockouttime.test +++ b/hledger/test/errors/tcclockouttime.test @@ -1,7 +1,5 @@ -# * tcclockouttime error -# ** 1. -$ hledger check -f tcclockouttime.timeclock ->2 /hledger: Error: .*tcclockouttime.timeclock:5:1: +$$$ 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 \| \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^ @@ -9,4 +7,4 @@ $ hledger check -f tcclockouttime.timeclock 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 +>>>= 1 diff --git a/hledger/test/errors/tcorderedactions.test b/hledger/test/errors/tcorderedactions.test index 7bdd0bb2a..f0ccb62c2 100644 --- a/hledger/test/errors/tcorderedactions.test +++ b/hledger/test/errors/tcorderedactions.test @@ -1,7 +1,5 @@ -# * tcorderedactions error -# ** 1. -$ hledger check -f tcorderedactions.timeclock ->2 /hledger: Error: .*tcorderedactions.timeclock:8:1: +$$$ hledger check -f tcorderedactions.timeclock +>>>2 /hledger: Error: .*tcorderedactions.timeclock:8:1: 8 \| i 2022-01-01 00:01:00 \| \^ @@ -9,4 +7,4 @@ Expected a timeclock o entry but got i. Only one session may be clocked in at a time. Please alternate i and o, beginning with i. / ->= 1 +>>>= 1 diff --git a/hledger/test/errors/uniqueleafnames.test b/hledger/test/errors/uniqueleafnames.test index b1a66d435..d6d2161e2 100644 --- a/hledger/test/errors/uniqueleafnames.test +++ b/hledger/test/errors/uniqueleafnames.test @@ -1,7 +1,5 @@ -# * uniqueleafnames error -# ** 1. -$ hledger check uniqueleafnames -f uniqueleafnames.j ->2 /hledger: Error: .*uniqueleafnames.j:12: +$$$ hledger check uniqueleafnames -f uniqueleafnames.j +>>>2 /hledger: Error: .*uniqueleafnames.j:12: \| 2022-01-01 p 9 \| \(a:c\) 1 ... @@ -12,4 +10,4 @@ $ hledger check uniqueleafnames -f uniqueleafnames.j Checking for unique account leaf names is enabled, and account leaf name "c" is not unique. It appears in these account names, which a/ ->= 1 +>>>= 1