jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: jakarta-regexp/src/java/org/apache/regexp RETest.java
Date Sun, 07 Sep 2003 15:04:14 GMT
vgritsenko    2003/09/07 08:04:14

  Modified:    src/java/org/apache/regexp RETest.java
  Log:
  Add one more test
  
  Revision  Changes    Path
  1.7       +12 -1     jakarta-regexp/src/java/org/apache/regexp/RETest.java
  
  Index: RETest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RETest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RETest.java	6 Sep 2003 01:45:51 -0000	1.6
  +++ RETest.java	7 Sep 2003 15:04:14 -0000	1.7
  @@ -608,5 +608,16 @@
           {
               fail("Wrong subst() result: " + s);
           }
  +
  +        // Test subst() with backreferences without leading characters
  +        // before first backreference
  +        r = new RE("(.*?)=(.*)");
  +        s = r.subst("variable=value",
  +                           "$1_test_$212", RE.REPLACE_BACKREFERENCES);
  +        if (!s.equals("variable_test_value12"))
  +        {
  +            fail("Wrong subst() result: " + s);
  +        }
  +
       }
   }
  
  
  

Mime
View raw message