railslove / cmxl

your friendly MT940 SWIFT file parser for bank statements
http://railslove.com
MIT License
46 stars 25 forks source link

fixes short refs in transactions swalloing delimiters #22

Closed Uepsilon closed 6 years ago

Uepsilon commented 6 years ago

fixes #20

bumi commented 6 years ago

damn, this stuff is so hard to read :) why did you change the fixture? I'd say for such cases we should add additional fixtures - so keep the old one and add a new one.

Uepsilon commented 6 years ago

@bumi did that, but had to adapt the old fixture as it was not spec-confirm (bank reference was 17 chars, max at 16)

issue is, that if the bank ref is longer than the expected 16 char, any further information may not be parsed correctly. this is true for all other expected matches with a fixed max length

bumi commented 6 years ago

ok, great! as it was a mocked transaction anyway and it probably does not introduce a problem with existing files that should be fine.

As many mt940 files are not fully following the specs I think it is a good idea to add as many fixtures as possible for such cases.