def test_watchman_query_params_glob_generator(self): query_params = format_watchman_query_params(["**/*.java"], ["**/*Test.java"], False, "/path/to/glob", True) self.assertEquals( { "relative_root": "/path/to/glob", "glob": ["**/*.java"], "fields": ["name"], "expression": [ "allof", ["anyof", ["type", "f"], ["type", "l"]], ["not", ["anyof", ["match", "**/*Test.java", "wholename", {}]]], ], }, query_params, )
def test_watchman_query_params_includes(self): query_params = format_watchman_query_params(['**/*.java'], [], False, '/path/to/glob') self.assertEquals( { 'relative_root': '/path/to/glob', 'path': [''], 'fields': ['name'], 'expression': [ 'allof', 'exists', ['anyof', ['type', 'f'], ['type', 'l']], ['anyof', ['match', '**/*.java', 'wholename', {}]], ] }, query_params)
def test_watchman_query_params_includes(self): query_params = format_watchman_query_params(["**/*.java"], [], False, "/path/to/glob", False) self.assertEquals( { "relative_root": "/path/to/glob", "path": [""], "fields": ["name"], "expression": [ "allof", ["anyof", ["type", "f"], ["type", "l"]], "exists", ["anyof", ["match", "**/*.java", "wholename", {}]], ], }, query_params, )
def test_watchman_query_params_includes(self): query_params = format_watchman_query_params( ['**/*.java'], [], False, '/path/to/glob') self.assertEquals( { 'relative_root': '/path/to/glob', 'path': [''], 'fields': ['name'], 'expression': [ 'allof', 'exists', ['anyof', ['type', 'f'], ['type', 'l']], ['anyof', ['match', '**/*.java', 'wholename', {}]], ] }, query_params)
def test_watchman_query_params_glob_generator(self): query_params = format_watchman_query_params(['**/*.java'], ['**/*Test.java'], False, '/path/to/glob', True) self.assertEquals( { 'relative_root': '/path/to/glob', 'glob': ['**/*.java'], 'fields': ['name'], 'expression': [ 'allof', ['anyof', ['type', 'f'], ['type', 'l']], [ 'not', ['anyof', ['match', '**/*Test.java', 'wholename', {}]] ], ] }, query_params)
def test_watchman_query_params_glob_generator(self): query_params = format_watchman_query_params( ['**/*.java'], ['**/*Test.java'], False, '/path/to/glob', True) self.assertEquals( { 'relative_root': '/path/to/glob', 'glob': ['**/*.java'], 'fields': ['name'], 'expression': [ 'allof', ['anyof', ['type', 'f'], ['type', 'l']], ['not', ['anyof', ['match', '**/*Test.java', 'wholename', {}]]], ] }, query_params)