dev: errors: small csv error test fixes

This commit is contained in:
Simon Michael 2022-07-15 10:38:00 +01:00
parent 7ecfe23a91
commit 41cd8c3e06
12 changed files with 12 additions and 20 deletions

View File

@ -453,11 +453,7 @@ line of conditional table should have 2 values, but this one has only 1
### csvnoinclude ### csvnoinclude
``` ```
hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./csvnoinclude.j:4:23: hledger: Error: sorry, CSV files can't be included yet
|
4 | include csvinclude.csv
| ^
No existing files match pattern: csvinclude.csv
``` ```

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
# Non-zero for both amount-in and amount-out. # Non-zero for both amount-in and amount-out.
2022-01-01,1, 2022-01-01,1,
2022-01-02,1,0 2022-01-02,1,0

1 #!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
2 # Non-zero for both amount-in and amount-out. # Non-zero for both amount-in and amount-out.
3 2022-01-01,1, 2022-01-01,1,
4 2022-01-02,1,0 2022-01-02,1,0

View File

@ -1,4 +1,4 @@
$$$ hledger print -f csvamountonenonzero.csv $$$ hledger check -f csvamountonenonzero.csv
>>>2 /hledger: Error: multiple non-zero amounts assigned, >>>2 /hledger: Error: multiple non-zero amounts assigned,
please ensure just one. \(https:\/\/hledger.org\/csv.html#amount\) please ensure just one. \(https:\/\/hledger.org\/csv.html#amount\)
record values: "2022-01-03","1","2" record values: "2022-01-03","1","2"

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
# Unparseable amount. # Unparseable amount.
2022-01-01,1 2022-01-01,1
2022-01-02,$1 2022-01-02,$1

1 #!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
2 # Unparseable amount. # Unparseable amount.
3 2022-01-01,1 2022-01-01,1
4 2022-01-02,$1 2022-01-02,$1

View File

@ -1,4 +1,4 @@
$$$ hledger print -f csvamountparse.csv $$$ hledger check -f csvamountparse.csv
>>>2 /hledger: Error: error: could not parse "badamount" as an amount >>>2 /hledger: Error: error: could not parse "badamount" as an amount
record values: "2022-01-03","badamount" record values: "2022-01-03","badamount"
the amount rule is: %2 the amount rule is: %2

View File

@ -1,3 +1,3 @@
#!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
# Unparseable balance amount. # Unparseable balance amount.
2022-01-03,badbalance 2022-01-03,badbalance

1 #!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger check -f
2 # Unparseable balance amount. # Unparseable balance amount.
3 2022-01-03,badbalance 2022-01-03,badbalance

View File

@ -1,4 +1,4 @@
$$$ hledger print -f csvbalanceparse.csv $$$ hledger check -f csvbalanceparse.csv
>>>2 /hledger: Error: error: could not parse "badbalance" as balance1 amount >>>2 /hledger: Error: error: could not parse "badbalance" as balance1 amount
record values: "2022-01-03","badbalance" record values: "2022-01-03","badbalance"
the balance rule is: %2 the balance rule is: %2

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger print -f
# See rules (missing/bad date-format rule). # See rules (missing/bad date-format rule).
# Note check doesn't show this error; print was needed. # Note check doesn't show this error, print is needed.
a,b a,b

1 #!/usr/bin/env -S hledger print -f
2 # See rules (missing/bad date-format rule).
3 # Note check doesn't show this error; print was needed. # Note check doesn't show this error, print is needed.
4 a,b

View File

@ -1,6 +1,6 @@
#!/usr/bin/env -S hledger check -f #!/usr/bin/env -S hledger check -f
# Trying to include a CSV file. # Trying to include a CSV file.
include csvinclude.csv include csvnoinclude.csv

View File

@ -1,9 +1,4 @@
$$$ hledger check -f csvnoinclude.j $$$ hledger check -f csvnoinclude.j
>>>2 /hledger: Error: .*csvnoinclude.j:4:23: >>>2 /hledger: Error: sorry, CSV files can't be included yet
\|
4 \| include csvinclude.csv
\| \^
No existing files match pattern: csvinclude.csv
/ /
>>>= 1 >>>= 1

View File

@ -1,5 +1,6 @@
#!/usr/bin/env -S hledger print -f #!/usr/bin/env -S hledger print -f
# Status value not parseable. # Status value not parseable.
# check not sufficient to show this error, print is needed
2022-01-01,* 2022-01-01,*
2022-01-02,! 2022-01-02,!
2022-01-03, 2022-01-03,

1 #!/usr/bin/env -S hledger print -f
2 # Status value not parseable.
3 # check not sufficient to show this error, print is needed
4 2022-01-01,*
5 2022-01-02,!
6 2022-01-03,

View File

@ -1,3 +1,3 @@
skip 2 skip 3
date %1 date %1
status %2 status %2