|
Committed new test in BugCLI162Test. The class BugCLI162Test is not invoked during a Maven build BTW.
Two of the options appear to be problematic in CLI162. The first is OPT_PASSWORD. In this the url is longer than the allowed width of the screen, so some kind of failure needs to happen - or the url needs to be mercilessly chopped. This is the one that goes into an infinite loop due to The second is OPT_PARAM_TYPES_INT + OPT_PARAM_TYPES_NAME, it shows the the patch for this ticket contained a bug when the lastPos happened to equal the firstPos for completely normal reasons. I'd missed that pos was already set to a real value when the loop was begun and not to 0. I'm not sure why both options have to be set for this to happen. Attaching patch that rolls back the previous RuntimeException throwing. The if statement in that patch was testing the wrong condition. This patch adds the correct condition, and rather than throwing an exception the text is simply outputted irregardless of the fact it is over the width. What should happen is debatable here - due to a side-effect of
The test code no longer expects to get a RuntimeException. svn ci -m "Applying my second attempt at a patch to
Sending src/java/org/apache/commons/cli/HelpFormatter.java Ended up modifying this to break it up to fit screen width.
Discovered another infinite loop issue if the entered width is smaller than the nextTabStop (ie: argument + indent). Throw IllegalStateException on last infinite loop test case.
svn ci -m "Applying additional patch to throw IllegalStateException when the speci |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CLI-162. A new ticket for the RuntimeException is atCLI-174"Sending src/java/org/apache/commons/cli/HelpFormatter.java
Adding src/test/org/apache/commons/cli/bug/BugCLI162Test.java
Transmitting file data ..
Committed revision 735257.