From 6604fefd5c7b02b679881e3f04824f27f67ab58a Mon Sep 17 00:00:00 2001 From: 35V LG84 <35vlg84-x4e6b92@e257.fi> Date: Wed, 25 Dec 2024 21:22:42 +0200 Subject: [PATCH] Add account selector tests Balance and Balance-Group need own reference vectors for: https://github.com/paupino/rust-decimal/issues/695 Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi> --- suite | 2 +- tests/sh/reporting-ok.sh | 93 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/suite b/suite index 8cfe685..e20463e 160000 --- a/suite +++ b/suite @@ -1 +1 @@ -Subproject commit 8cfe6850a7d403c54d1a63bfb4780cb3a477f3f9 +Subproject commit e20463efe633dab1149ff417106236627402910c diff --git a/tests/sh/reporting-ok.sh b/tests/sh/reporting-ok.sh index f7fe64a..969f8c7 100755 --- a/tests/sh/reporting-ok.sh +++ b/tests/sh/reporting-ok.sh @@ -93,6 +93,99 @@ cmp_result $module ${test_name} txn equity cmp_result $module ${test_name} txn identity echo ": ok" +##################################################################### +# +# bal-acc-01 +# +# test: 53f67fea-6307-44ca-9834-7a2f9b71a15a +rm -f $OUTPUT_DIR/* +test_name=bal-acc-01 +echo "test: $module/$test_name: " + +$TACKLER_SH \ + --config $SUITE_PATH/$module/ok.bal-acc.toml \ + --input.file $SUITE_PATH/$module/ok/reporting.txn \ + --output.dir $OUTPUT_DIR \ + --output.prefix ${test_name} + +echo -n "check:" +cmp_result $module ${test_name} txt balgrp +cmp_result $module ${test_name} txt reg +cmp_result $module ${test_name} txn equity +cmp_result $module ${test_name} txn identity +echo ": ok" + +# https://github.com/paupino/rust-decimal/issues/695 +$TACKLER_SH \ + --config $SUITE_PATH/$module/ok.bal-acc.toml \ + --input.file $SUITE_PATH/$module/ok/reporting.txn \ + --output.dir $OUTPUT_DIR \ + --output.prefix ${test_name}-ng \ + --reports balance + +echo -n "check:" +cmp_result $module ${test_name}-ng txt bal +echo ": ok" + + +##################################################################### +# +# balgrp-acc-01 +# +# test: 3ec3e091-dc23-455b-963a-4ba66db7223f +rm -f $OUTPUT_DIR/* +test_name=balgrp-acc-01 +echo "test: $module/$test_name: " + +$TACKLER_SH \ + --config $SUITE_PATH/$module/ok.balgrp-acc.toml \ + --input.file $SUITE_PATH/$module/ok/reporting.txn \ + --output.dir $OUTPUT_DIR \ + --output.prefix ${test_name} \ + +echo -n "check:" +cmp_result $module ${test_name} txt bal +cmp_result $module ${test_name} txt reg +cmp_result $module ${test_name} txn equity +cmp_result $module ${test_name} txn identity +echo ": ok" + +# https://github.com/paupino/rust-decimal/issues/695 +$TACKLER_SH \ + --config $SUITE_PATH/$module/ok.balgrp-acc.toml \ + --input.file $SUITE_PATH/$module/ok/reporting.txn \ + --output.dir $OUTPUT_DIR \ + --output.prefix ${test_name}-ng \ + --reports balance-group + +echo -n "check:" +cmp_result $module ${test_name}-ng txt balgrp +echo ": ok" + + +##################################################################### +# +# register-acc-01 +# +# test: 7d95bef8-6aaa-4706-a276-d206752d017b +rm -f $OUTPUT_DIR/* +test_name=register-acc-01 +echo "test: $module/$test_name: " + +$TACKLER_SH \ + --config $SUITE_PATH/$module/ok.register-acc.toml \ + --input.file $SUITE_PATH/$module/ok/reporting.txn \ + --output.dir $OUTPUT_DIR \ + --output.prefix ${test_name} \ + +echo -n "check:" +cmp_result $module ${test_name} txt bal +cmp_result $module ${test_name} txt balgrp +cmp_result $module ${test_name} txt reg +cmp_result $module ${test_name} txn equity +cmp_result $module ${test_name} txn identity +echo ": ok" + ##################################################################### # # rep-01