[ 
https://issues.apache.org/jira/browse/IO-680?focusedWorklogId=466787&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-466787
 ]

ASF GitHub Bot logged work on IO-680:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Aug/20 13:31
            Start Date: 05/Aug/20 13:31
    Worklog Time Spent: 10m 
      Work Description: XenoAmess edited a comment on pull request #137:
URL: https://github.com/apache/commons-io/pull/137#issuecomment-669194030


   @sebbASF 
   > What conditions are missed by the existing tests?
   
   In short, it lacks situations I added.
   In details, it lacks:
   
   1. "" and "\n" (also includes "" and "\r", "" and "\r\n"...)
   because "" is very tricky, and it is hard to say it for sure whether we 
think them equal.
   
   2. "a\n" and "a\n\n"
   This might sounds stupid, but actually very tricky. because. this function 
think "a" equals "a\n", but it thinks "a\n" not equals "a\n\n".
   Only a non-CRLF char can be follow a ending CRLF and cause no difference to 
original, in this function.
   and another related tricky example is "a\n" and "a\r\n"be equal.
   
   3. some Readers who same to itself.
   The existing tests only have some examples for a same Object, who will be 
killed exit at the first == check.
   But it lacks some real same input test.
   
   4. for every tests, it lacks verse.
   whenever check `contentEqualsIgnoreEOF(input1,input2)` be true, must make 
sure it `contentEqualsIgnoreEOF(input2,input1)` also be true.
   
   5. some \r, \n, \r\n examples.
   the original only have one \r\n example, but have no tests for \r and \n.
   
   6. non-equal-length examples.
   like "123" and "1234" be false.
   they share common prefix, but a longer one is not same.
   
   7. some really not equal examples.
   like "1235" and "1234", they really differ on some char, and should return 
false.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 466787)
    Time Spent: 40m  (was: 0.5h)

> add more tests for IOUtils.contentEqualsIgnoreEOL
> -------------------------------------------------
>
>                 Key: IO-680
>                 URL: https://issues.apache.org/jira/browse/IO-680
>             Project: Commons IO
>          Issue Type: Test
>            Reporter: Jin Xu
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-io/pull/137]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to