mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
Add test for fopen_packed()
This commit is contained in:
1 parent
b0e0247b21
commit
299075c930
6 files changed
+158
-20
No files matched your search
@@ -1335,8 +1335,21 @@ static void test_multipart(void) {
|
||||
ASSERT(mg_http_next_multipart(mg_str(s), ofs, &part) == 0);
|
||||
}
|
||||
|
||||
static void test_packed(void) {
|
||||
FILE *fp = fopen_packed("Makefile", "r");
|
||||
#if defined(__linux__) && defined(GCC)
|
||||
ASSERT(fp != NULL);
|
||||
fseek(fp, 0, SEEK_END);
|
||||
ASSERT(ftell(fp) > 0);
|
||||
fclose(fp);
|
||||
#else
|
||||
ASSERT(fp == NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
mg_log_set("3");
|
||||
test_packed();
|
||||
test_crc32();
|
||||
test_multipart();
|
||||
test_http_chunked();
|
||||
|
||||
Reference in new issue
Block a user