Search in sources :

Example 6 with WatchmanQuery

use of com.facebook.buck.io.WatchmanQuery in project buck by facebook.

the class WatchmanWatcherTest method watchmanQueryWithRepoRelativePrefix.

@Test
public void watchmanQueryWithRepoRelativePrefix() {
    WatchmanQuery query = WatchmanWatcher.createQuery(ProjectWatch.of("path/to/repo", Optional.of("project")), ImmutableSet.of(), ImmutableSet.of(Watchman.Capability.DIRNAME));
    assertThat(query.toList(""), hasItem(hasEntry("relative_root", "project")));
}
Also used : WatchmanQuery(com.facebook.buck.io.WatchmanQuery) Test(org.junit.Test)

Aggregations

WatchmanQuery (com.facebook.buck.io.WatchmanQuery)6 Test (org.junit.Test)5 PathOrGlobMatcher (com.facebook.buck.io.PathOrGlobMatcher)4 WatchmanCursor (com.facebook.buck.io.WatchmanCursor)1 Path (java.nio.file.Path)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 EasyMock.anyObject (org.easymock.EasyMock.anyObject)1