mdbx-tests: поддержка значений on/off для опций командной строки.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2025-03-06 20:58:31 +03:00
parent b2bd8bae38
commit 8dda33329b

View File

@ -313,12 +313,12 @@ bool parse_option(int argc, char *const argv[], int &narg, const char *option, b
return true;
}
if (strcasecmp(value_cstr, "yes") == 0 || strcasecmp(value_cstr, "1") == 0) {
if (strcasecmp(value_cstr, "yes") == 0 || strcasecmp(value_cstr, "1") == 0 || strcasecmp(value_cstr, "on") == 0) {
value = true;
return true;
}
if (strcasecmp(value_cstr, "no") == 0 || strcasecmp(value_cstr, "0") == 0) {
if (strcasecmp(value_cstr, "no") == 0 || strcasecmp(value_cstr, "0") == 0 || strcasecmp(value_cstr, "off") == 0) {
value = false;
return true;
}