Prevent same history test from running multiple times at once

The default matching logic for fish_tests was prefix based, so when we
were running `history` we were also running all history tests. This
causes the test to fail for an unknown reason.
This commit is contained in:
Mahmoud Al-Qudsi 2021-03-23 02:46:31 -05:00 committed by Johannes Altmanninger
parent 77b332221a
commit c82d1980bf

View File

@ -103,8 +103,7 @@ static bool should_test_function(const char *func_name, bool default_on = true)
result = default_on;
} else {
for (size_t i = 0; s_arguments[i] != nullptr; i++) {
if (!std::strncmp(func_name, s_arguments[i], std::strlen(s_arguments[i]))) {
// Prefix match.
if (!std::strcmp(func_name, s_arguments[i])) {
result = true;
break;
}