ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r348658 - /ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java
Date Thu, 24 Nov 2005 05:26:41 GMT
Author: bodewig
Date: Wed Nov 23 21:26:34 2005
New Revision: 348658

URL: http://svn.apache.org/viewcvs?rev=348658&view=rev
Log:
adapt to output differences in different versions of svn client

Modified:
    ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java

Modified: ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java
URL: http://svn.apache.org/viewcvs/ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java?rev=348658&r1=348657&r2=348658&view=diff
==============================================================================
--- ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java (original)
+++ ant/antlibs/svn/trunk/src/testcases/org/apache/ant/svn/AbstractSvnTaskTest.java Wed Nov
23 21:26:34 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  2005 The Apache Software Foundation
+ * Copyright 2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -47,7 +47,26 @@
     public void testRevisionAttribute() {
         File f = getProject().resolveFile("tmpdir/trunk/build.xml");
         assertTrue("starting empty", !f.exists());
-        expectLogContaining("revision-attribute", "A  trunk/build.xml");
+
+        // used to be
+        // expectLogContaining("revision-attribute", "A  trunk/build.xml");
+        // but the number of spaces between the status and the file depends
+        // on the version of the command line client
+        executeTarget("revision-attribute");
+        String log = getLog();
+        int buildFileIndex = log.indexOf("trunk/build.xml");
+        assertTrue("expected message about build.xml, log was: " + log,
+                   buildFileIndex > -1);
+        for (int i = buildFileIndex - 1; i > -1; --i) {
+            char c = log.charAt(i);
+            if (c != ' ') {
+                assertEquals('A', c);
+                break;
+            }
+        }
+        assertTrue("expexted 'A' status for build.xml, log was:" +log,
+                   buildFileIndex > -1);
+
         assertTrue("now it is there", f.exists());
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message