org.apache.jsieve.comparator
Class ComparatorUtilsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jsieve.comparator.ComparatorUtilsTest
All Implemented Interfaces:
junit.framework.Test

public class ComparatorUtilsTest
extends junit.framework.TestCase


Constructor Summary
ComparatorUtilsTest()
           
 
Method Summary
 void testMatchesStringString()
           
 void testSieveToJavaRegex()
          The ":matches" version specifies a wildcard match using the characters "*" and "?".
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComparatorUtilsTest

public ComparatorUtilsTest()
Method Detail

testMatchesStringString

public void testMatchesStringString()
                             throws org.apache.jsieve.exception.SievePatternException
Throws:
org.apache.jsieve.exception.SievePatternException

testSieveToJavaRegex

public void testSieveToJavaRegex()
The ":matches" version specifies a wildcard match using the characters "*" and "?". "*" matches zero or more characters, and "?" matches a single character. "?" and "*" may be escaped as "\\?" and "\\*" in strings to match against themselves. The first backslash escapes the second backslash; together, they escape the "*". This is awkward, but it is commonplace in several programming languages that use globs and regular expressions.



Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.