guess-mime-type: Devine le mime type
This commit is contained in:
14
guess-mime-type/test/testGuess.c
Normal file
14
guess-mime-type/test/testGuess.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mimetype.h"
|
||||
|
||||
int main(void) {
|
||||
assert(strcmp(guessMimeType("/tmp/file"), "application/octet-stream") == 0);
|
||||
assert(strcmp(guessMimeType("www/car.avif"), "image/avif") == 0);
|
||||
assert(strcmp(guessMimeType("css.html"), "text/html") == 0);
|
||||
assert(strcmp(guessMimeType("html.css.js"), "application/javascript") == 0);
|
||||
printf("Success!\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user