[webkit-reviews] review requested: [Bug 36983] new-run-webkit-tests ignores trailing EOL differences in text tests : [Attachment 68339] 1st attempt to fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 21 22:56:29 PDT 2010


Cosmin Truta <ctruta at chromium.org> has asked  for review:
Bug 36983: new-run-webkit-tests ignores trailing EOL differences in text tests
https://bugs.webkit.org/show_bug.cgi?id=36983

Attachment 68339: 1st attempt to fix
https://bugs.webkit.org/attachment.cgi?id=68339&action=review

------- Additional Comments from Cosmin Truta <ctruta at chromium.org>
Not sure whether the two instances of s/^(\r\n)*// in my patch are necessary. I
assumed they are, because, otherwise, the original code would have used rstrip
instead of strip, but I could be wrong.

Also, not entirely sure whether the use of strip was originally intended to
remove all trailing "\r\n" or just one of them. I assumed all; otherwise, the
original code would have probably been much simpler, something like:
  text = text.replace("\r\n", "\n")
  if not text.endswith("\n"):
    text = text + "\n"


More information about the webkit-reviews mailing list