Mercurial > hg4j
diff test/org/tmatesoft/hg/test/TestIgnore.java @ 343:58016b1b8554
HgIgnore: glob patterns not to match substring when not meant to
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 19 Nov 2011 01:07:27 +0100 |
parents | 516b817415ba |
children | a0864b2892cd |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestIgnore.java Fri Nov 18 05:10:33 2011 +0100 +++ b/test/org/tmatesoft/hg/test/TestIgnore.java Sat Nov 19 01:07:27 2011 +0100 @@ -88,6 +88,14 @@ for (Path p : toCheck) { errorCollector.assertTrue(p.toString(), hgIgnore.isIgnored(p)); } + s = "syntax:glob\n.git"; + hgIgnore = HgInternals.newHgIgnore(new StringReader(s)); + Path p = Path.create(".git/aa"); + errorCollector.assertTrue(p.toString(), hgIgnore.isIgnored(p)); + p = Path.create("dir/.git/bb"); + errorCollector.assertTrue(p.toString(), hgIgnore.isIgnored(p)); + p = Path.create("dir/.gittt/cc"); + errorCollector.assertTrue(p.toString(), !hgIgnore.isIgnored(p)); } @Test