Commit 9af6d81
committed
Fixes #2342
1. In T["Files utils"]["get_mimetype"]["can invoke file"], we mock vim.fn.executable so that it returns 1 and triggers the (mocked) file command. This test makes sure the get_mimetype function can parse the output of the file command.
2. Rename T["Files utils"]["get_mimetype"]["works without file"] to T["Files utils"]["get_mimetype"]["works with fallback"], and mock vim.fn.executable to return 0 so that it never invokes the file command. This test makes sure the hardcoded map is working.1 parent 2eaf2fb commit 9af6d81
1 file changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
181 | 190 | | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | | - | |
| 194 | + | |
185 | 195 | | |
| 196 | + | |
186 | 197 | | |
187 | 198 | | |
188 | 199 | | |
| |||
197 | 208 | | |
198 | 209 | | |
199 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
200 | 219 | | |
201 | | - | |
| 220 | + | |
202 | 221 | | |
203 | 222 | | |
| 223 | + | |
204 | 224 | | |
205 | 225 | | |
206 | 226 | | |
0 commit comments