-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add testcase for ledger syntax
Signed-off-by: Kilerd Chan <[email protected]>
- Loading branch information
Showing
9 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
; comment here | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
; comment here | ||
Expenses:Food | ||
; comment here | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
; comment here | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
; comment here | ||
; comment here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
; comment here | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
; comment here | ||
Expenses:Food | ||
; comment here | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
; comment here | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Assets:BankCard -50 CNY | ||
Expenses:Food | ||
; comment here | ||
; comment here |
23 changes: 23 additions & 0 deletions
23
integration-tests/comments-between-postings/validations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ | ||
{ | ||
"uri": "/api/journals", | ||
"validations": [ | ||
[ | ||
"$.data.records[0].postings.length()", | ||
2 | ||
], | ||
[ | ||
"$.data.records[1].postings.length()", | ||
2 | ||
], | ||
[ | ||
"$.data.records[2].postings.length()", | ||
2 | ||
], | ||
[ | ||
"$.data.records[3].postings.length()", | ||
2 | ||
] | ||
] | ||
} | ||
] |
11 changes: 11 additions & 0 deletions
11
integration-tests/inconsitent-indent-for-postings/main.bean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Expenses:A -0.0CNY | ||
Expenses:Food | ||
Expenses:Fo | ||
Expenses:A -0.0CNY |
11 changes: 11 additions & 0 deletions
11
integration-tests/inconsitent-indent-for-postings/main.zhang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Expenses:A -0.0CNY | ||
Expenses:Food | ||
Expenses:Fo | ||
Expenses:A -0.0CNY |
11 changes: 11 additions & 0 deletions
11
integration-tests/inconsitent-indent-for-postings/validations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ | ||
"uri": "/api/journals", | ||
"validations": [ | ||
[ | ||
"$.data.records[0].postings.length()", | ||
4 | ||
] | ||
] | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
integration-tests/space-of-posting-uint-can-be-empty/main.bean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Expenses:A -0.0CNY | ||
Expenses:Food -0.0CNY@1USD | ||
Expenses:Food -0.0CNY@@1USD |
10 changes: 10 additions & 0 deletions
10
integration-tests/space-of-posting-uint-can-be-empty/main.zhang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
option "operating_currency" "CNY" | ||
|
||
1970-01-01 open Assets:BankCard CNY | ||
|
||
1970-01-01 open Expenses:Food CNY | ||
|
||
2023-12-06 "KFC" "VME50 Package" | ||
Expenses:A -0.0CNY | ||
Expenses:Food -0.0CNY@1USD | ||
Expenses:Food -0.0CNY@@1USD |
11 changes: 11 additions & 0 deletions
11
integration-tests/space-of-posting-uint-can-be-empty/validations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ | ||
"uri": "/api/journals", | ||
"validations": [ | ||
[ | ||
"$.data.records[0].postings.length()", | ||
3 | ||
] | ||
] | ||
} | ||
] |