Return invalid_iban when iban size is less than 4 bytes
The following error was raised:
1) test parse returns error when receive single char as parameter (ExIban.ParserTest)
test/parser_test.exs:5
** (FunctionClauseError) no function clause matching in String.slice/3
The following arguments were given to String.slice/3:
# 1
"-"
# 2
4
# 3
-3
Attempted function clauses (showing 3 out of 3):
def slice(_, _, 0)
def slice(string, start, length) when is_binary(string) and is_integer(start) and is_integer(length) and start >= 0 and length >= 0
def slice(string, start, length) when is_binary(string) and is_integer(start) and is_integer(length) and start < 0 and length >= 0
code: {:error, :invalid_iban} = ExIban.Parser.parse("-")
stacktrace:
(elixir 1.14.2) lib/string.ex:2111: String.slice/3
(exiban 0.0.6) lib/exiban/parser.ex:23: ExIban.Parser.parse/1
test/parser_test.exs:6: (test)
The following error was raised: