summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2013-04-04 03:42:25 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2013-04-04 03:42:25 -0400
commit81b601de53125bbcd30620b58168154d7541d8ad (patch)
tree92b7fed2238522fc39c3492f4662300426b86d04 /org.eclipse.jgit.test
parentac0481039da211261248bfba1683f489dc341d92 (diff)
parentc9a94dc1eeabeda212ed0b2eab0afdd67331b848 (diff)
downloadjgit-81b601de53125bbcd30620b58168154d7541d8ad.tar.gz
jgit-81b601de53125bbcd30620b58168154d7541d8ad.zip
Merge "Fix PathFilterGroup not to throw StopWalkException too early"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
index 8038206e9b..4c329cb191 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
@@ -76,7 +76,8 @@ public class PathFilterGroupTest {
"b/c",
"c/d/e",
"c/d/f",
- "d/e/f/g"
+ "d/e/f/g",
+ "d/e/f/g.x"
};
// @formatter:on
filter = PathFilterGroup.createFromStrings(paths);
@@ -90,6 +91,7 @@ public class PathFilterGroupTest {
assertTrue(filter.include(fakeWalk("c/d/e")));
assertTrue(filter.include(fakeWalk("c/d/f")));
assertTrue(filter.include(fakeWalk("d/e/f/g")));
+ assertTrue(filter.include(fakeWalk("d/e/f/g.x")));
}
@Test
@@ -132,6 +134,11 @@ public class PathFilterGroupTest {
assertTrue(filter.include(fakeWalk("c/d/e/f")));
assertTrue(filter.include(fakeWalk("c/d/f/g")));
assertTrue(filter.include(fakeWalk("d/e/f/g/h")));
+ assertTrue(filter.include(fakeWalk("d/e/f/g/y")));
+ assertTrue(filter.include(fakeWalk("d/e/f/g.x/h")));
+ // listed before g/y, so can't StopWalk here, but it's not included
+ // either
+ assertFalse(filter.include(fakeWalk("d/e/f/g.y")));
}
@Test
@@ -172,6 +179,9 @@ public class PathFilterGroupTest {
// good
}
+ // less obvious #2 due to git sorting order
+ filter.include(fakeWalk("d/e/f/g/h.txt"));
+
// non-ascii
try {
filter.include(fakeWalk("\u00C0"));