@Test
public void testLabel() {
// README
// lib/tags.rb
// app/models/user_topic.rb
OffListElement ole;
model.setFilter("readme");
model.refilter();
ole = (OffListElement)model.getElementAt(0);
ole.getFilename();
// assertTrue(Pattern.matches("^README$", ole.getLabel()));
model.setFilter("tags");
model.refilter();
ole = (OffListElement)model.getElementAt(0);
ole.getFilename();
// assertTrue(Pattern.matches("^tags\\.rb\\s\\[lib\\]$", ole.getLabel()));
model.setFilter("user_topic");
model.refilter();
ole = (OffListElement)model.getElementAt(0);
ole.getFilename();
// assertTrue(Pattern.matches("^user_topic\\.rb\\s\\[app\\/models\\]$", ole.getLabel()));
String[] filters = { "a/m/", "a/m/u" };
for (String f : filters) {
model.setFilter(f);
model.refilter();
ole = (OffListElement)model.getElementAt(0);
ole.getFilename();
}
// assertTrue(Pattern.matches("^user_topic\\.rb\\s\\[app\\/models\\]$", ole.getLabel()));
}