1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-05-01 00:07:19 +02:00

Update MaxmindDB to current git.

This commit is contained in:
Sandu Liviu Catalin
2021-08-22 20:15:19 +03:00
parent 0008869ddd
commit 69a4d305a5
40 changed files with 2291 additions and 1912 deletions
+8 -6
View File
@@ -1,7 +1,6 @@
#include "maxminddb_test_helper.h"
void run_tests(int mode, const char *mode_desc)
{
void run_tests(int mode, const char *mode_desc) {
const char *filename = "MaxMind-DB-string-value-entries.mmdb";
const char *path = test_database_path(filename);
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
@@ -14,18 +13,21 @@ void run_tests(int mode, const char *mode_desc)
MMDB_entry_data_s entry_data;
int status = MMDB_get_value(&result.entry, &entry_data, NULL);
cmp_ok(status, "==", MMDB_SUCCESS,
cmp_ok(status,
"==",
MMDB_SUCCESS,
"status for MMDB_get_value() is MMDB_SUCCESS");
ok(entry_data.has_data, "found a value when varargs list is just NULL");
cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UTF8_STRING,
cmp_ok(entry_data.type,
"==",
MMDB_DATA_TYPE_UTF8_STRING,
"returned entry type is utf8_string");
MMDB_close(mmdb);
free(mmdb);
}
int main(void)
{
int main(void) {
plan(NO_PLAN);
for_all_modes(&run_tests);
done_testing();