}
@Test
public void testNormalMatch() {
settings.setSmartMatch(false);
assertTrue(new Filter("foo", settings).matches("foobar.rb"));
assertFalse(new Filter("foo", settings).matches("foob/ar.rb"));
assertTrue(new Filter("Foo", settings).matches("foobar.rb"));
assertFalse(new Filter("foo", settings).matches("floobar"));
assertTrue(new Filter("*bar", settings).matches("foobar.rb"));
assertTrue(new Filter("ba*r", settings).matches("bazaar"));
assertTrue(new Filter("ba\\", settings).matches("ba\\"));
assertTrue(new Filter("ba\\nk", settings).matches("ba\\nk"));
assertFalse(new Filter("ba\\", settings).matches("bank"));
// from start, name with underscore
assertTrue(new Filter("partial", settings).matches("_partial"));
// with dir
assertTrue(new Filter("app/mo", settings).matches("app/model1"));
settings.setMatchFromStart(false);
assertTrue(new Filter("bar", settings).matches("foobar.rb"));
assertTrue(new Filter("Bar", settings).matches("foobar"));
assertFalse(new Filter("bar", settings).matches("fublar"));
assertTrue(new Filter("ba*r", settings).matches("thebazaar"));
// anywhere, name with underscore
assertTrue(new Filter("partial", settings).matches("_partial"));
}