Package org.tmatesoft.hg.internal

Examples of org.tmatesoft.hg.internal.PathScope.accept()


    errorCollector.assertTrue(!ps2.accept(Path.create("d/f/")));
    errorCollector.assertTrue(!ps2.accept(Path.create("b/f/")));
    // files
    errorCollector.assertTrue(!ps2.accept(Path.create("a/b/c")))// file, no exact match
    errorCollector.assertTrue(ps2.accept(Path.create("d/e/f/g"))); // file under scope[2]
    errorCollector.assertTrue(!ps2.accept(Path.create("b/e")));    // unrelated file
   
    // matchParentDirs == false
    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
View Full Code Here


    errorCollector.assertTrue(ps2.accept(Path.create("d/e/f/g"))); // file under scope[2]
    errorCollector.assertTrue(!ps2.accept(Path.create("b/e")));    // unrelated file
   
    // matchParentDirs == false
    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));
View Full Code Here

    errorCollector.assertTrue(!ps2.accept(Path.create("b/e")));    // unrelated file
   
    // matchParentDirs == false
    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));
View Full Code Here

   
    // matchParentDirs == false
    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
View Full Code Here

    // matchParentDirs == false
    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
View Full Code Here

    PathScope ps3 = new PathScope(false, true, true, Path.create("a/b/")); // match any dir/file under a/b/, but not above
    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
    errorCollector.assertTrue(!ps4.accept(Path.create("a/")));
View Full Code Here

    errorCollector.assertTrue(!ps3.accept(Path.create("a/")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c/d")));
    errorCollector.assertTrue(ps3.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(!ps3.accept(Path.create("b/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
    errorCollector.assertTrue(!ps4.accept(Path.create("a/")));
    errorCollector.assertTrue(!ps4.accept(Path.create("a/b/c")));
View Full Code Here

    errorCollector.assertTrue(!ps3.accept(Path.create("d/")));
    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
    errorCollector.assertTrue(!ps4.accept(Path.create("a/")));
    errorCollector.assertTrue(!ps4.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(ps4.accept(Path.create("a/b/c/d")));
  }

  @Test
View Full Code Here

    errorCollector.assertTrue(!ps3.accept(Path.create("d/e/")));

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
    errorCollector.assertTrue(!ps4.accept(Path.create("a/")));
    errorCollector.assertTrue(!ps4.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(ps4.accept(Path.create("a/b/c/d")));
  }

  @Test
  public void testPathCompareWith() {
View Full Code Here

    // match nested but not direct dir
    PathScope ps4 = new PathScope(false, true, false, Path.create("a/b/")); // match any dir/file *deep* under a/b/,
    errorCollector.assertTrue(!ps4.accept(Path.create("a/")));
    errorCollector.assertTrue(!ps4.accept(Path.create("a/b/c")));
    errorCollector.assertTrue(ps4.accept(Path.create("a/b/c/d")));
  }

  @Test
  public void testPathCompareWith() {
    Path p1 = Path.create("a/b/");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.