[ 
https://issues.apache.org/jira/browse/FILEUPLOAD-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605008#comment-13605008
 ] 

Sebb commented on FILEUPLOAD-232:
---------------------------------

Yes, that may be a useful starting point. 
However there is only one test case - i.e. testEncodeText() - that covers the 
code in Commons (only the decode parts were copied).
And that test requires the encoding routines which are not available (unless we 
add a test dependency).

Also, the tests do not directly test the package protected classes.

Nor do they test error conditions, for example non-hex digits following an '=' 
char in QuotedPrintableDecoder().
Even lower-case hex does not seem to be handled; maybe it's not allowed by the 
spec, but it should either be treated the same as upper case, or cause an error 
to be thrown. 
As far as I can tell, at present the code will treat invalid chars the same as 
=00, which seems wrong.
                
> There are no unit tests for the new utils.mime classes
> ------------------------------------------------------
>
>                 Key: FILEUPLOAD-232
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-232
>             Project: Commons FileUpload
>          Issue Type: Bug
>            Reporter: Sebb
>
> There are no unit tests for the new utils.mime classes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to