avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/components/util/test PathMatcherTestCase.java
Date Wed, 30 Oct 2002 07:42:21 GMT
donaldp     2002/10/29 23:42:21

  Modified:    src/test/org/apache/avalon/phoenix/components/util/test
                        PathMatcherTestCase.java
  Log:
  Add a few more test cases
  
  Revision  Changes    Path
  1.2       +24 -1     jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/components/util/test/PathMatcherTestCase.java
  
  Index: PathMatcherTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/components/util/test/PathMatcherTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PathMatcherTestCase.java	30 Oct 2002 07:39:18 -0000	1.1
  +++ PathMatcherTestCase.java	30 Oct 2002 07:42:21 -0000	1.2
  @@ -38,4 +38,27 @@
           assertTrue( PATH2 + " matches", matcher.match( PATH2 ) );
           assertTrue( PATH3 + " matches", matcher.match( PATH3 ) );
       }
  +
  +    public void testMatch2()
  +    {
  +        final String[] includes = new String[]{"**/*.jar"};
  +        final String[] excludes = new String[]{};
  +        final PathMatcher matcher = new PathMatcher( includes, excludes );
  +
  +        assertTrue( PATH1 + " matches", matcher.match( PATH1 ) );
  +        assertTrue( PATH2 + " matches", matcher.match( PATH2 ) );
  +        assertTrue( PATH3 + " not matches", !matcher.match( PATH3 ) );
  +    }
  +
  +    public void testMatch3()
  +    {
  +        final String[] includes = new String[]{"**/*.jar"};
  +        final String[] excludes = new String[]{"**/bar*"};
  +        final PathMatcher matcher = new PathMatcher( includes, excludes );
  +
  +        assertTrue( PATH1 + " matches", matcher.match( PATH1 ) );
  +        assertTrue( PATH2 + " not matches", !matcher.match( PATH2 ) );
  +        assertTrue( PATH3 + " not matches", !matcher.match( PATH3 ) );
  +    }
  +
   }
  
  
  

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


Mime
View raw message