Skip to content

Commit

Permalink
test: re-generate official example
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornaz committed Mar 29, 2024
1 parent 1c25176 commit 3d71dec
Show file tree
Hide file tree
Showing 6 changed files with 3,802 additions and 5,192 deletions.
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export RUST_BACKTRACE := "0"

# Perform all verifications (compile, test, lint, etc.)
verify: test lint doc check-msrv
just run balance tests/samples/official.beancount \
just run balance tests/samples/includes.beancount \
| grep 'Expenses:Taxes:Y2022:US:Federal:PreTax401k 18500.00 IRAUSD' \
> /dev/null
just run balance tests/samples/official.beancount \
just run balance tests/samples/includes.beancount \
| grep 'Assets:MyBank:Checking 2662.68 USD' \
> /dev/null

Expand Down
3 changes: 2 additions & 1 deletion tests/parse_from_file_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use beancount_parser::BeancountFile;
#[rstest]
#[case("comments.beancount", 0)]
#[case("simple.beancount", 16)]
#[case("official.beancount", 2154)]
#[case("official.beancount", 1714)]
#[case("includes.beancount", 1731)]
fn can_parse_example_files(#[case] file_name: &str, #[case] expected_directive_count: usize) {
let mut path: PathBuf = "./tests/samples".into();
path.push(file_name);
Expand Down
2 changes: 1 addition & 1 deletion tests/samples/cycle.beancount
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include "./official.beancount"
include "./includes.beancount"
8 changes: 8 additions & 0 deletions tests/samples/includes.beancount
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include "./comments.beancount"
include "./simple.beancount"
include "./official.beancount"
include "./includes.beancount"
include "./cycle.beancount"

2024-04-01 open Foo:Bar:Baz CHF

Loading

0 comments on commit 3d71dec

Please sign in to comment.