Author: bayard Date: Fri Feb 27 09:38:10 2009 New Revision: 748463 URL: http://svn.apache.org/viewvc?rev=748463&view=rev Log: Adjusting - best is to switch to an indent of 1 than do silly things like having every line have 1 character. CLI-162
Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI162Test.java Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java?rev=748463&r1=748462&r2=748463&view=diff ============================================================================== --- commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java (original) +++ commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java Fri Feb 27 09:38:10 2009 @@ -822,7 +822,7 @@ if (nextLineTabStop >= width) { // stops infinite loop happening - nextLineTabStop = width - 1; + nextLineTabStop = 1; } // all following lines must be padded with nextLineTabStop space Modified: commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI162Test.java URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI162Test.java?rev=748463&r1=748462&r2=748463&view=diff ============================================================================== --- commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI162Test.java (original) +++ commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI162Test.java Fri Feb 27 09:38:10 2009 @@ -267,34 +267,15 @@ HelpFormatter formatter = new HelpFormatter(); StringWriter sw = new StringWriter(); formatter.printHelp(new PrintWriter(sw), 22, this.getClass().getName(), "Header", options, 0, 5, "Footer"); + System.err.println(sw.toString()); String expected = "usage:\n" + " org.apache.comm\n" + " ons.cli.bug.Bug\n" + " CLI162Test\n" + "Header\n" + "-x,--extralongarg\n" + - " T\n" + - " h\n" + - " i\n" + - " s\n" + - " d\n" + - " e\n" + - " s\n" + - " c\n" + - " r\n" + - " i\n" + - " p\n" + - " t\n" + - " i\n" + - " o\n" + - " n\n" + - " i\n" + - " s\n" + - " L\n" + - " o\n" + - " n\n" + - " g\n" + - " .\n" + + " This description is\n" + + " Long.\n" + "Footer\n"; assertEquals( "Long arguments did not split as expected", expected, sw.toString() ); }