ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional ANTLRTest.java
Date Tue, 01 Apr 2003 10:54:36 GMT
bodewig     2003/04/01 02:54:36

  Modified:    src/etc/testcases/taskdefs/optional/antlr antlr.xml
               src/testcases/org/apache/tools/ant/taskdefs/optional
                        ANTLRTest.java
  Log:
  ANTLR 2.7.2 creates two files, PR 17807
  
  Revision  Changes    Path
  1.8       +15 -19    ant/src/etc/testcases/taskdefs/optional/antlr/antlr.xml
  
  Index: antlr.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/antlr/antlr.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- antlr.xml	20 Jun 2002 15:03:46 -0000	1.7
  +++ antlr.xml	1 Apr 2003 10:54:36 -0000	1.8
  @@ -5,6 +5,10 @@
     <property name="tmp.dir" location="antlr.tmp"/>
   
   
  +  <target name="setup">
  +    <mkdir dir="${tmp.dir}"/>
  +  </target>
  +
     <target name="test1">
       <antlr/>
     </target>
  @@ -13,24 +17,20 @@
       <antlr target="antlr.g" outputdirectory="${tmp.dir}"/>
     </target>
   
  -  <target name="test3">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test3" depends="setup">
       <antlr target="antlr.g" outputdirectory="${tmp.dir}"/>
     </target>
   
  -  <target name="test4">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test4" depends="setup">
       <antlr target="java.g" outputdirectory="${tmp.dir}"/>
       <antlr dir="${tmp.dir}" target="java.tree.g" outputdirectory="${tmp.dir}"/>
     </target>
   
  -  <target name="test5">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test5" depends="setup">
       <antlr target="java.tree.g" outputdirectory="${tmp.dir}" fork="yes"/>
     </target>
   
  -  <target name="test6">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test6" depends="setup">
       <antlr target="java.g" outputdirectory="${tmp.dir}" />
       <antlr dir="${tmp.dir}"
              target="java.tree.g"
  @@ -42,12 +42,11 @@
       <antlr target="antlr.xml"/>
     </target>
   
  -  <target name="test8">
  +  <target name="test8" depends="setup">
       <antlr target="extended.calc.g" outputdirectory="${tmp.dir}" glib="non-existant-file.g"/>
     </target>
   
  -  <target name="test9">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test9" depends="setup">
       <!-- Note that I had to copy the grammars over to the temporary directory.  -->
       <!-- This is because ANTLR expects the super grammar and its generated java -->
       <!-- files to be in the same directory, which won't be the case if I use    -->
  @@ -58,28 +57,25 @@
       <antlr target="${tmp.dir}/extended.calc.g" glib="${tmp.dir}/antlr.g"/>
     </target>
   
  -  <target name="test10">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test10" depends="setup">
       <antlr target="antlr.g" outputdirectory="${tmp.dir}" html="yes"/>
     </target>
   
  -  <target name="test11">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test11" depends="setup">
       <antlr target="antlr.g" outputdirectory="${tmp.dir}" diagnostic="yes"/>
     </target>
   
  -  <target name="test12">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test12" depends="setup">
       <antlr target="antlr.g" outputdirectory="${tmp.dir}" trace="yes"/>
     </target>
   
  -  <target name="test13">
  -    <mkdir dir="${tmp.dir}"/>
  +  <target name="test13" depends="setup">
       <antlr target="antlr.g" outputdirectory="${tmp.dir}" traceLexer="yes" traceParser="yes"
traceTreeWalker="yes"/>
     </target>
   
     <target name="cleanup">
       <delete dir="${tmp.dir}" />
  +    <delete file="../../../../../../CalcParserTokenTypes.txt"/>
     </target>
   
   </project>
  
  
  
  1.12      +5 -5      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java
  
  Index: ANTLRTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ANTLRTest.java	10 Feb 2003 14:14:51 -0000	1.11
  +++ ANTLRTest.java	1 Apr 2003 10:54:36 -0000	1.12
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -56,13 +56,13 @@
   
   import java.io.*;
   import org.apache.tools.ant.BuildFileTest;
  +
   /**
    * If you want to run tests, it is highly recommended
  - * to download ANTLR (www.antlr.org), build the 'all' jar
  - * with the mkalljar script and drop the jar (about 300KB) into
  + * to download ANTLR (www.antlr.org), build the 'antlrall.jar' jar
  + * with  <code>make antlr-all.jar</code> and drop the jar (about 300KB) into
    * Ant lib.
    * - Running w/ the default antlr.jar (70KB) does not work (missing class)
  - * - Running w/ the antlr jar made w/ mkjar (88KB) does not work (still another class missing)
    *
    * Unless of course you specify the ANTLR classpath in your
    * system classpath. (see ANTLR install.html)
  @@ -142,7 +142,7 @@
           executeTarget("test10");
           File outputDirectory = new File(TASKDEFS_DIR + "antlr.tmp");
           String[] calcFiles = outputDirectory.list(new HTMLFilter());
  -        assertEquals(1, calcFiles.length);
  +        assertTrue(calcFiles.length > 0);
       }
   
       /**
  
  
  

Mime
View raw message