Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CR/LF not recognized in tests #4

Open
nerdoc opened this issue May 9, 2018 · 1 comment
Open

CR/LF not recognized in tests #4

nerdoc opened this issue May 9, 2018 · 1 comment

Comments

@nerdoc
Copy link

nerdoc commented May 9, 2018

Hi Craig, (I'm the one who translated your lib to Python)
I just saw that your tests don't cover the possibility that EDIFACT files could have line breaks.
the tests read the files line-wise, and cut out each "\n".

Other files (like in medical purpose) use lines like

UNA:+,? '[snip]
FTX+BFD++Herr
'FTX+BFD++Dr?. Max Musterarzt
'FTX+BFD++Beispielstraße?. 13
'[snip]

So there is a \n after each line, but before the ' - so that the \n is a part of the freetext there.
It's not easy to check that correctly, but you can't just drop all "\n"s.

An (dumb) approach would be to drop all "\n" which follow an segment terminator...? (they are just for readability of an EDI file)
Greetings from Salzburg,
Christian

@duncan3dc
Copy link
Member

Hi Christian,

Thanks very much for raising this, I'll take a look at the specification and see how new lines should be handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants