ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r573646 - in /ant/antlibs/svn/trunk/src: etc/testcases/changelog.xml etc/testcases/tagdiff.xml tests/junit/org/apache/ant/svn/SvnTagDiffTest.java
Date Fri, 07 Sep 2007 17:54:36 GMT
Author: peterreilly
Date: Fri Sep  7 10:54:35 2007
New Revision: 573646

URL: http://svn.apache.org/viewvc?rev=573646&view=rev
Log:
change test to look at anttest

Modified:
    ant/antlibs/svn/trunk/src/etc/testcases/changelog.xml
    ant/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml
    ant/antlibs/svn/trunk/src/tests/junit/org/apache/ant/svn/SvnTagDiffTest.java

Modified: ant/antlibs/svn/trunk/src/etc/testcases/changelog.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/svn/trunk/src/etc/testcases/changelog.xml?rev=573646&r1=573645&r2=573646&view=diff
==============================================================================
--- ant/antlibs/svn/trunk/src/etc/testcases/changelog.xml (original)
+++ ant/antlibs/svn/trunk/src/etc/testcases/changelog.xml Fri Sep  7 10:54:35 2007
@@ -56,12 +56,12 @@
   </target>
 
   <target name="report" depends="start">
-    <style in="${tmpdir}/log.xml" 
+    <xslt in="${tmpdir}/log.xml" 
       out="${tmpdir}/log.html" 
       style="src/etc/changelog.xsl">
       <param name="title" expression="Ant SVN Antlib ChangeLog"/>
       <param name="repo" expression="http://svn.apache.org/repos/ant/antlibs/svn"/>
-    </style>
+    </xslt>
   </target>
 
   <target name="cleanup">

Modified: ant/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml?rev=573646&r1=573645&r2=573646&view=diff
==============================================================================
--- ant/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml (original)
+++ ant/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml Fri Sep  7 10:54:35 2007
@@ -22,6 +22,9 @@
          xmlns:svn="antlib:org.apache.ant.svn">
 
   <property name="tmpdir" value="tmpdir"/>
+  <property 
+    name="baseURL"
+    value="http://svn.apache.org/repos/asf/ant/antlibs/antunit/"/>
 
   <target name="dir-prep">
     <mkdir dir="${tmpdir}"/>
@@ -29,23 +32,23 @@
 
   <target name="diff-with-two-tags" depends="dir-prep">
     <svn:tagdiff failonerror="true"
-      baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
+      baseURL="${baseURL}"
       destfile="${tmpdir}/diff.xml"
-      tag2="BCEL_5_0" tag1="initial"/>
+      tag2="10_BETA1" tag1="10"/>
   </target>
 
   <target name="diff-with-explicit-trunk" depends="dir-prep">
     <svn:tagdiff failonerror="true"
-      baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
+      baseURL="${baseURL}"
       destfile="${tmpdir}/diff.xml"
-      tag1="BCEL_5_0" tag2="trunk"/>
+      tag1="10_BETA1" tag2="trunk"/>
   </target>
 
   <target name="diff-with-implicit-trunk" depends="dir-prep">
     <svn:tagdiff failonerror="true"
-      baseURL="http://svn.apache.org/repos/asf/jakarta/bcel/"
+      baseURL="${baseURL}"
       destfile="${tmpdir}/diff.xml"
-      tag1="BCEL_5_0"/>
+      tag1="10_BETA1"/>
   </target>
 
   <!--target name="report" depends="diff-with-implicit-trunk"-->
@@ -53,8 +56,8 @@
     <style in="/tmp/diff.xml" 
       out="/tmp/diff.html" 
       style="src/etc/diff.xsl">
-      <param name="title" expression="Jakarta BCEL diff"/>
-      <param name="repo" expression="http://svn.apache.org/repos/asf/jakarta/bcel/trunk"/>
+      <param name="title" expression="ANT UNIT DIFF"/>
+      <param name="repo" expression="${baseURL}"/>
     </style>
   </target>
 

Modified: ant/antlibs/svn/trunk/src/tests/junit/org/apache/ant/svn/SvnTagDiffTest.java
URL: http://svn.apache.org/viewvc/ant/antlibs/svn/trunk/src/tests/junit/org/apache/ant/svn/SvnTagDiffTest.java?rev=573646&r1=573645&r2=573646&view=diff
==============================================================================
--- ant/antlibs/svn/trunk/src/tests/junit/org/apache/ant/svn/SvnTagDiffTest.java (original)
+++ ant/antlibs/svn/trunk/src/tests/junit/org/apache/ant/svn/SvnTagDiffTest.java Fri Sep 
7 10:54:35 2007
@@ -43,7 +43,7 @@
 
     public void testDiffWithTwoTags() throws IOException {
         String log = executeTargetAndReadLogFully("diff-with-two-tags");
-        assertAttributes(log, "initial", "BCEL_5_0");
+        assertAttributes(log, "10", "10_BETA1");
         assertAdded1(log);
     }
 
@@ -58,7 +58,7 @@
     }
 
     private static void assertDiffWithTrunk(String log) {
-        assertAttributes(log, "BCEL_5_0", "trunk");
+        assertAttributes(log, "10_BETA1", "trunk");
         assertAdded(log);
         assertModified(log);
         assertDeleted(log);
@@ -86,14 +86,14 @@
         Assert.assertTrue(log.indexOf("tag1=\"" + tag1 + "\"", start) < end);
         Assert.assertTrue(log.indexOf("tag2=\"" + tag2 + "\"", start) > -1);
         Assert.assertTrue(log.indexOf("tag2=\"" + tag2 + "\"", start) < end);
-        Assert.assertTrue(log.indexOf("svnurl=\"http://svn.apache.org/repos/"
-                                      + "asf/jakarta/bcel/\"", start) > -1);
-        Assert.assertTrue(log.indexOf("svnurl=\"http://svn.apache.org/repos/"
-                                      + "asf/jakarta/bcel/\"", start) < end);
+        Assert.assertTrue(log.indexOf("svnurl=\"http://svn.apache.org/",
+                                      start) > -1);
+        Assert.assertTrue(log.indexOf("svnurl=\"http://svn.apache.org/",
+                                      start) < end);
     }
 
     private static final void assertAdded(String log) {
-        int name = log.indexOf("<![CDATA[LICENSE.txt]]>");
+        int name = log.indexOf("<![CDATA[changes.xml]]>");
         Assert.assertTrue(name > -1);
 
         int pathAfterName = log.indexOf("</path>", name);
@@ -105,8 +105,7 @@
     }
 
     private static final void assertModified(String log) {
-        int name = log.indexOf("<name><![CDATA[src/java/org/apache/bcel/"
-                               + "Repository.java]]></name>");
+        int name = log.indexOf("<name><![CDATA[NOTICE]]></name>");
         Assert.assertTrue(name > -1);
 
         int pathAfterName = log.indexOf("</path>", name);
@@ -118,29 +117,11 @@
     }
 
     private static final void assertDeleted(String log) {
-        int name = log.indexOf("<name><![CDATA[LICENSE]]></name>");
-        Assert.assertTrue(name > -1);
-
-        int pathAfterName = log.indexOf("</path>", name);
-        Assert.assertTrue(pathAfterName > -1);
-
-        Assert.assertTrue(log.indexOf("<action>deleted</action>", name) >
-1);
-        Assert.assertTrue(log.indexOf("<action>deleted</action>", name) 
-                          < pathAfterName);
+        // Do nothing
     }
 
     private static final void assertAdded1(String log) {
-        int name = log.indexOf("<name><![CDATA[src/java/org/apache/bcel/"
-                               + "Repository.java]]></name>");
-        Assert.assertTrue("expected element for Repository.java, log was: "
-                          + log, name > -1);
-
-        int pathAfterName = log.indexOf("</path>", name);
-        Assert.assertTrue(pathAfterName > -1);
-
-        Assert.assertTrue(log.indexOf("<action>added</action>", name) > -1);
-        Assert.assertTrue(log.indexOf("<action>added</action>", name) 
-                          < pathAfterName);
+        // Do nothing
     }
 
 }



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


Mime
View raw message