mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-30 11:22:19 +08:00
mdbx-test: add min/max cases for option values.
Change-Id: Ie77b828376a75aad09ea4dab202178b1f09bc6ad
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user