ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant PropertyExpansionTest.java
Date Wed, 17 Apr 2002 04:18:01 GMT
stevel      02/04/16 21:18:01

  Modified:    src/testcases/org/apache/tools/ant
                        PropertyExpansionTest.java
  Log:
  merged in my tests. Added a new one verifying that properties we havent heard of get included
as literals.
  
  Revision  Changes    Path
  1.3       +25 -3     jakarta-ant/src/testcases/org/apache/tools/ant/PropertyExpansionTest.java
  
  Index: PropertyExpansionTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/PropertyExpansionTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertyExpansionTest.java	16 Apr 2002 10:35:08 -0000	1.2
  +++ PropertyExpansionTest.java	17 Apr 2002 04:18:01 -0000	1.3
  @@ -84,12 +84,34 @@
           project.setProperty("expanded","EXPANDED");
           assertExpandsTo("a${expanded}b","aEXPANDEDb");
           assertExpandsTo("${expanded}${expanded}","EXPANDEDEXPANDED");
  -        assertExpandsTo("a$b","a$b");
  -        assertExpandsTo("$}}","$}}");
  -        assertExpandsTo("$$$-","$$-");
           assertExpandsTo("$$$","$$");
           assertExpandsTo("$$$$-","$$-");
           assertExpandsTo("","");
  +        assertExpandsTo("Class$$subclass","Class$subclass");    
  +    }
  +    
  +    /**
  +     * new things we want
  +     */
  +    public void testDollarPassthru() {
  +        assertExpandsTo("$-","$-");    
  +        assertExpandsTo("Class$subclass","Class$subclass");    
  +        assertExpandsTo("$$$-","$$-");
  +        assertExpandsTo("$$$$$","$$$");
  +        assertExpandsTo("${unassigned.property}","${unassigned.property}");
  +        assertExpandsTo("a$b","a$b");
  +        assertExpandsTo("$}}","$}}");
  +    }
  +
  +    
  +    /**
  +     * old things we dont want; not a test no more
  +     */
  +    public void oldtestQuirkyLegacyBehavior() {
  +        assertExpandsTo("Class$subclass","Classsubclass");    
  +        assertExpandsTo("$$$-","$-");
  +        assertExpandsTo("a$b","ab");
  +        assertExpandsTo("$}}","}}");
       }
   
       /**
  
  
  

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


Mime
View raw message