#!/usr/bin/env bash # # Tax statement generation regression test # set -eux if [ $# -ne 4 ]; then echo "Invalid usage:" "$@" exit 1 fi config="$1" broker="$2" year="$3" statement_path="$4" reference_year=2023 reference_short_year=$((reference_year - 2020)) cp "src/tax_statement/statement/testdata/filled.dc$reference_short_year" "$statement_path" [ "$year" -eq "$reference_year" ] || sed -i "s/^\(DLSG Decl\)$reference_year/\\1$year/" "$statement_path" ./tests/investments "$config" tax-statement "$broker" "$year" "$statement_path"