REMOVE IBAN EXAMPLE SUMMARY AND ADD JSON FIXTURES

This commit removes the implementation summary for IBAN test coverage and adds a new module to generate test fixtures in
JSON format from the IBAN examples.
This commit is contained in:
2025-12-02 10:59:09 -05:00
parent befe29334f
commit 71aa8cfde6
6 changed files with 2389 additions and 147 deletions

View File

@@ -212,7 +212,11 @@ defp filter_by_numeric_only(specs, nil), do: specs
defp filter_by_numeric_only(specs, numeric_only) do
Enum.filter(specs, fn {_code, spec} ->
is_numeric_only?(spec["bban_spec"]) == numeric_only
# Use numeric_only field if available, otherwise fall back to bban_spec check
case spec["numeric_only"] do
nil -> is_numeric_only?(spec["bban_spec"]) == numeric_only
value -> value == numeric_only
end
end)
end
@@ -222,7 +226,8 @@ defp has_branch_code?(spec) do
end
defp has_national_check?(spec) do
Map.has_key?(spec["positions"], "national_check")
positions = spec["positions"]["national_check"]
positions != nil and positions["start"] != positions["end"]
end
defp is_numeric_only?(bban_spec) do