test: errors: make tests runnable
This commit is contained in:
parent
3775b97f04
commit
2b2d643333
@ -392,7 +392,7 @@ journalCheckAccountsDeclared j = mapM_ checkacct (journalPostings j)
|
|||||||
++ case ptransaction of
|
++ case ptransaction of
|
||||||
Nothing -> ""
|
Nothing -> ""
|
||||||
Just t -> printf "in transaction at: %s\n\n%s"
|
Just t -> printf "in transaction at: %s\n\n%s"
|
||||||
(sourcePosPairPretty $ tsourcepos t)
|
(sourcePosPairPrettxy $ tsourcepos t)
|
||||||
(linesPrepend " " . (<>"\n") . textChomp $ showTransaction t)
|
(linesPrepend " " . (<>"\n") . textChomp $ showTransaction t)
|
||||||
where
|
where
|
||||||
as = journalAccountNamesDeclared j
|
as = journalAccountNamesDeclared j
|
||||||
|
|||||||
2
hledger/test/errors/failing-balance-assertion.j
Normal file → Executable file
2
hledger/test/errors/failing-balance-assertion.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check
|
#!/usr/bin/env -S hledger check -f
|
||||||
|
|
||||||
1/1
|
1/1
|
||||||
a 0 = 1
|
a 0 = 1
|
||||||
|
|||||||
2
hledger/test/errors/invalid-date.j
Normal file → Executable file
2
hledger/test/errors/invalid-date.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check
|
#!/usr/bin/env -S hledger check -f
|
||||||
|
|
||||||
2022/1/32
|
2022/1/32
|
||||||
(a:c) 1
|
(a:c) 1
|
||||||
|
|||||||
2
hledger/test/errors/invalid-regex.j
Normal file → Executable file
2
hledger/test/errors/invalid-regex.j
Normal file → Executable file
@ -1,3 +1,3 @@
|
|||||||
# hledger check
|
#!/usr/bin/env -S hledger check -f
|
||||||
|
|
||||||
alias /(/ = a
|
alias /(/ = a
|
||||||
|
|||||||
2
hledger/test/errors/nonunique-leaf-names.j
Normal file → Executable file
2
hledger/test/errors/nonunique-leaf-names.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check uniqueleafnames
|
#!/usr/bin/env -S hledger check uniqueleafnames -f
|
||||||
|
|
||||||
account a:c ; XXX check uniqueleafnames doesn't notice these
|
account a:c ; XXX check uniqueleafnames doesn't notice these
|
||||||
account b:c ;
|
account b:c ;
|
||||||
|
|||||||
2
hledger/test/errors/parse-error.j
Normal file → Executable file
2
hledger/test/errors/parse-error.j
Normal file → Executable file
@ -1,3 +1,3 @@
|
|||||||
# hledger check
|
#!/usr/bin/env -S hledger check -f
|
||||||
|
|
||||||
1
|
1
|
||||||
|
|||||||
4
hledger/test/errors/showall
Executable file
4
hledger/test/errors/showall
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# execute all journals, showing their error message
|
||||||
|
|
||||||
|
for f in *.j; do echo $f:; ./$f || true; done
|
||||||
2
hledger/test/errors/unbalanced-txn.j
Normal file → Executable file
2
hledger/test/errors/unbalanced-txn.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check
|
#!/usr/bin/env -S hledger check -f
|
||||||
|
|
||||||
1/1
|
1/1
|
||||||
a 1
|
a 1
|
||||||
|
|||||||
2
hledger/test/errors/undeclared-acct.j
Normal file → Executable file
2
hledger/test/errors/undeclared-acct.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check accounts
|
#!/usr/bin/env -S hledger check accounts -f
|
||||||
|
|
||||||
1/1
|
1/1
|
||||||
(a) 1
|
(a) 1
|
||||||
|
|||||||
2
hledger/test/errors/undeclared-commodity.j
Normal file → Executable file
2
hledger/test/errors/undeclared-commodity.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check commodities
|
#!/usr/bin/env -S hledger check commodities -f
|
||||||
|
|
||||||
account a
|
account a
|
||||||
|
|
||||||
|
|||||||
2
hledger/test/errors/undeclared-payee.j
Normal file → Executable file
2
hledger/test/errors/undeclared-payee.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check payees
|
#!/usr/bin/env -S hledger check payees -f
|
||||||
|
|
||||||
account a
|
account a
|
||||||
commodity A
|
commodity A
|
||||||
|
|||||||
2
hledger/test/errors/unordered-dates.j
Normal file → Executable file
2
hledger/test/errors/unordered-dates.j
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
# hledger check ordereddates
|
#!/usr/bin/env -S hledger check ordereddates -f
|
||||||
|
|
||||||
account a
|
account a
|
||||||
commodity 1.
|
commodity 1.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user