On Sun, 14 Sep 2008, Michael Karcher wrote:
This hunk is unneded. PROFILE_isspaceW already checks for \n and \r. The already present check for '\n' could be removed, but that should be a separate patch. I will send it (together with a cleanup in PROFILE_isspaceW) after testing.
Thanks. Indeed, tests still pass. Will remove the hunk and resend.
[...] Wouldn't it be sensible to factor out the common testing code, and just pass the string that gets written to the file as parameter? (I didn't check line-by-line that it matches, but the comment seems to implicate it.) If you refactor, you could also add a test that uses mixed endings (some \r, some \n, some \r\n).
I'm just trying for a minimal fix and simple test for \r-terminated ini files here. If you want to clean it up further, feel free.
-- -erik http://useofwords.blogspot.com/