If a testing framework only looks at dump_in.json, there is no indicator there to determine the output newline format should be DOS-style. If trying to exactly match the tests, this test will break if it there's no other source for information. Currently I implement this check by looking at the expected output and if it has "\r\n" then set the newlines to "\r\n" for the library.
I would propose that dump_in.json would be written using "\r\n" at the end so that one file could solely be the source of input. Alternately, update the test so dump_out.nt only use "\n" and presume all newlines are CR.
If a testing framework only looks at
dump_in.json
, there is no indicator there to determine the output newline format should be DOS-style. If trying to exactly match the tests, this test will break if it there's no other source for information. Currently I implement this check by looking at the expected output and if it has "\r\n" then set the newlines to "\r\n" for the library.I would propose that
dump_in.json
would be written using "\r\n" at the end so that one file could solely be the source of input. Alternately, update the test sodump_out.nt
only use "\n" and presume all newlines are CR.