@Test
public void testSubTreeStatus() throws Exception {
repo = Configuration.get().find("status-1");
HgStatusCommand cmd = new HgStatusCommand(repo);
StatusCollector sc = new StatusCollector();
cmd.match(new PathGlobMatcher("*"));
cmd.all().execute(sc);
assertTrue(sc.getErrors().isEmpty());
/*
* C .hgignore
* ? file1
* M file2
* C readme
*/
final Path file1 = Path.create("file1");
assertTrue(sc.get(file1).contains(Unknown));
assertTrue(sc.get(file1).size() == 1);
assertTrue(sc.get(Removed).isEmpty());
assertTrue(sc.get(Clean).size() == 2);
assertTrue(sc.get(Modified).size() == 1);
//
cmd.match(new PathGlobMatcher("dir/*")).execute(sc = new StatusCollector());
assertTrue(sc.getErrors().isEmpty());
/*
* I dir/file3
* R dir/file4
* R dir/file5