commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons/cli/src/test/org/apache/commons/cli TestHelpFormatter.java
Date Fri, 04 Oct 2002 11:06:58 GMT
jstrachan    2002/10/04 04:06:58

  Modified:    cli/src/test/org/apache/commons/cli TestHelpFormatter.java
  Log:
  Minor patch so that the unit test cases work on Windows. The main change is that end of
line characters can be different on different platforms.  
  So made the test less whitespace sensitive.
  
  Revision  Changes    Path
  1.5       +4 -4      jakarta-commons/cli/src/test/org/apache/commons/cli/TestHelpFormatter.java
  
  Index: TestHelpFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli/TestHelpFormatter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestHelpFormatter.java	19 Sep 2002 22:59:44 -0000	1.4
  +++ TestHelpFormatter.java	4 Oct 2002 11:06:58 -0000	1.5
  @@ -150,22 +150,22 @@
      {
          HelpFormatter hf = new HelpFormatter();
          Options options = null;
  -       String expected = "usage: app [-a]\n";
  +       String expected = "usage: app [-a]";
          ByteArrayOutputStream out = new ByteArrayOutputStream( );
          PrintWriter pw = new PrintWriter( out );
   
          options = new Options().addOption("a", false, "aaaa aaaa aaaa aaaa aaaa");
          hf.printUsage( pw, 60, "app", options );
          pw.flush();
  -       assertEquals("simple auto usage", expected, out.toString());
  +       assertEquals("simple auto usage", expected, out.toString().trim());
          out.reset();
   
  -       expected = "usage: app [-b] [-a]\n";
  +       expected = "usage: app [-b] [-a]";
          options = new Options().addOption("a", false, "aaaa aaaa aaaa aaaa aaaa")
          .addOption("b", false, "bbb" );
          hf.printUsage( pw, 60, "app", options );
          pw.flush();
  -       assertEquals("simple auto usage", expected, out.toString());
  +       assertEquals("simple auto usage", expected, out.toString().trim());
          out.reset();
      }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message