public void HonorsTopLevelIgnore() { WriteIgnore(".", "*.o"); _handler = new IgnoreHandler(db); Assert.IsTrue(_handler.IsIgnored("test.o")); }
public void HonorsExcludeFile() { WriteExclude("*.html"); _handler = new IgnoreHandler(db); Assert.IsTrue(_handler.IsIgnored("test.html")); }
public void HonorsConfigExcludes() { WriteConfigExcludes("ignoreHandler", "*.a"); _handler = new IgnoreHandler(db); Assert.IsTrue(_handler.IsIgnored("test.a")); }
public void TestNegated() { WriteIgnore(".", "*.o"); WriteIgnore("test", "!*.o"); _handler = new IgnoreHandler(db); Assert.IsFalse(_handler.IsIgnored("test/test.o")); }
public void MultipleIgnoreFiles() { WriteIgnore(".", "*.o"); WriteIgnore("./foo/bar", "baz"); _handler = new IgnoreHandler(db); Assert.IsTrue(_handler.IsIgnored("test.o")); Assert.IsTrue(_handler.IsIgnored("a/file/somewhere/down/the/hierarchy/test.o")); Assert.IsTrue(_handler.IsIgnored("foo/bar/down/the/hierarchy/baz")); Assert.IsTrue(_handler.IsIgnored("foo/bar/baz")); Assert.IsFalse(_handler.IsIgnored("baz")); Assert.IsFalse(_handler.IsIgnored("a/file/somewhere/down/the/hierarchy/baz")); }
public void PatternsWithPathComponent() { WriteIgnore(".", "foo/bar/*.o"); // <--- should ignore all o files only in foo/bar _handler = new IgnoreHandler(db); Assert.IsFalse(_handler.IsIgnored("test.o")); Assert.IsFalse(_handler.IsIgnored("a/file/somewhere/down/the/hierarchy/test.o")); Assert.IsTrue(_handler.IsIgnored("foo/bar/down/the/hierarchy/test.o")); Assert.IsTrue(_handler.IsIgnored("foo/bar/baz.o")); }