From c82d1980bfd4f3dcd92be04c9b643b902dddeb1a Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 23 Mar 2021 02:46:31 -0500 Subject: [PATCH] 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. --- src/fish_tests.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index 350273c00..b48c80029 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -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; }