[TESTS] Remove (pointless) warning from helper tokenize.

This commit is contained in:
Dave Davenport 2019-02-02 11:45:28 +01:00
parent c7243da062
commit 658f3993ba

View file

@ -116,8 +116,7 @@ END_TEST
START_TEST ( test_tokenizer_match_normal_single_ci_negate )
{
config.matching_method = MM_NORMAL;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "-noot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "-noot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , TRUE );
@ -130,9 +129,7 @@ END_TEST
START_TEST ( test_tokenizer_match_normal_multiple_ci_negate )
{
config.matching_method = MM_NORMAL;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "-noot aap", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "-noot aap", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , TRUE );
@ -146,8 +143,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_single_ci )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -164,8 +160,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_single_cs )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", TRUE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -182,8 +177,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_multiple_ci )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "no ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "no ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -196,9 +190,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_single_ci_question )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "n?ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "n?ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -211,8 +203,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_single_ci_star )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "n*ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "n*ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -225,9 +216,7 @@ END_TEST
START_TEST ( test_tokenizer_match_glob_multiple_ci_star )
{
config.matching_method = MM_GLOB;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "n* ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "n* ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -241,8 +230,7 @@ END_TEST
START_TEST ( test_tokenizer_match_fuzzy_single_ci )
{
config.matching_method = MM_FUZZY;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -259,9 +247,7 @@ END_TEST
START_TEST ( test_tokenizer_match_fuzzy_single_cs )
{
config.matching_method = MM_FUZZY;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", TRUE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -277,9 +263,7 @@ END_TEST
START_TEST ( test_tokenizer_match_fuzzy_multiple_ci )
{
config.matching_method = MM_FUZZY;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "no ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "no ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -313,9 +297,7 @@ END_TEST
START_TEST ( test_tokenizer_match_fuzzy_multiple_ci_split )
{
config.matching_method = MM_FUZZY;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "o n t", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "o n t", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -329,8 +311,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_single_ci )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -347,9 +328,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_single_cs )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "noot", TRUE );
rofi_int_matcher **tokens = helper_tokenize ( "noot", TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
@ -365,9 +344,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_multiple_ci )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "no ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "no ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -380,9 +357,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_single_ci_dq )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "n.?ot", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "n.?ot", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -395,8 +370,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_single_two_char )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "n[oa]{2}t", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "n[oa]{2}t", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , TRUE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );
@ -410,9 +384,7 @@ END_TEST
START_TEST ( test_tokenizer_match_regex_single_two_word_till_end )
{
config.matching_method = MM_REGEX;
rofi_int_matcher **tokens = NULL;
tokens = helper_tokenize ( "^(aap|noap)\\sMie.*", FALSE );
rofi_int_matcher **tokens = helper_tokenize ( "^(aap|noap)\\sMie.*", FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap noot mies") , FALSE );
ck_assert_int_eq ( helper_token_match ( tokens, "aap mies") , TRUE);
ck_assert_int_eq ( helper_token_match ( tokens, "nooaap mies") , FALSE );