My testing application is exporting some files in windows and other files in unix format. I want to compare those files with reference files using the files.compare method. But every time the test gives error saying the files are not equal. They are equal, except the format, windows/unix, the line endings are different. And when I try to save the reference files in other format, our version system doesn't keep that change.
Is there a way to compare windows files with unix files, ignoring the line endings?
Solved! Go to Solution.
As an option: post-process exported file and replace line ands to required format. Then compare with the reference file.
Thanks. Can you tell me how I can replace line endings? I found this page for adjusting line breaks: https://support.smartbear.com/testcomplete/docs/reference/program-objects/utilities/adjustlinebreaks..., but apparently it is obsolete.
I like to convert them from unix format [LF] to windows [CR][LF].