File tests/filetype/filetype.c changed (mode: 100644) (index 116cd35ca..94086afbe) |
... |
... |
TEST(zero_length_match) |
164 |
164 |
assert_null(prog_cmd = ft_get_program("git")); |
assert_null(prog_cmd = ft_get_program("git")); |
165 |
165 |
} |
} |
166 |
166 |
|
|
|
167 |
|
TEST(existence_check) |
|
168 |
|
{ |
|
169 |
|
assoc_programs("*.git", "tig", 0, 0); |
|
170 |
|
|
|
171 |
|
assert_false(ft_assoc_exists(&filetypes, "git", "tig")); |
|
172 |
|
|
|
173 |
|
assert_false(ft_assoc_exists(&filetypes, "*.git", "ti")); |
|
174 |
|
assert_false(ft_assoc_exists(&filetypes, "*.git", "{tig")); |
|
175 |
|
assert_false(ft_assoc_exists(&filetypes, "*.git", "{tig}")); |
|
176 |
|
|
|
177 |
|
assert_true(ft_assoc_exists(&filetypes, "*.git", "tig")); |
|
178 |
|
assert_true(ft_assoc_exists(&filetypes, "*.git", "{}tig")); |
|
179 |
|
assert_true(ft_assoc_exists(&filetypes, "*.git", "{help text}tig")); |
|
180 |
|
assert_true(ft_assoc_exists(&filetypes, "*.git", "{help text}\t tig")); |
|
181 |
|
} |
|
182 |
|
|
167 |
183 |
TEST(pattern_list, IF(has_mime_type_detection)) |
TEST(pattern_list, IF(has_mime_type_detection)) |
168 |
184 |
{ |
{ |
169 |
185 |
char cmd[1024]; |
char cmd[1024]; |