Skip to content

Commit

Permalink
test_keywordset: Add test for substring bug
Browse files Browse the repository at this point in the history
Update of "abcdef" with "+ab" wrongly resulted in "ab", because the
substring was matched for the keywords. Add a test for the bug fixed in
the last commit.
  • Loading branch information
donald committed Apr 19, 2020
1 parent 6362a8d commit dbaa76b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test_keywordset.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ int main() {
test_update(kws, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

keywordset_free(kws);

kws = keywordset_new("abcdef");
test_update(kws, "+ab", "ab abcdef");
test_update(kws, "+abcdefgh", "ab abcdef abcdefgh");
keywordset_free(kws);
}

0 comments on commit dbaa76b

Please sign in to comment.