mdbx-test: add min/max cases for option values.

Change-Id: Ie77b828376a75aad09ea4dab202178b1f09bc6ad
This commit is contained in:
Leonid Yuriev 2018-08-20 14:06:56 +03:00
parent b41bef8307
commit e7d4d24265

View File

@ -133,6 +133,16 @@ bool parse_option(int argc, char *const argv[], int &narg, const char *option,
return true;
}
if (strcmp(value_cstr, "min") == 0 || strcmp(value_cstr, "minimal") == 0) {
value = minval;
return true;
}
if (strcmp(value_cstr, "max") == 0 || strcmp(value_cstr, "maximal") == 0) {
value = maxval;
return true;
}
char *suffix = nullptr;
errno = 0;
unsigned long long raw = strtoull(value_cstr, &suffix, 0);