Enhancement - related to, but not fixing bug #293
- Added new attribute modifiers 'word' and 'noword' which find the existence of whole words, or prove the non-existence of whole words. If a task has the description "Pay the bill", then "description.word:the" will match, but "description.word:th" will not. For partial word matches, there is still "description.contains:th". - Added unit tests for the text.cpp functions. - Added unit tests including the new modifiers in filters. - Added unit tests to parse the new modifiers. - Modified man page. - Modified the Context::autoFilter processing to use the new modifiers for +tag and -tag filtering. - Added a support email to an error message, while looking at the filter code. - Added new modifiers to the help report. - Modified a utf8.t unit test to include an alphanumeric tag, rather than a smiley face.
This commit is contained in:
@@ -33,7 +33,7 @@ Context context;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (95);
|
||||
UnitTest t (97);
|
||||
|
||||
Att a;
|
||||
t.notok (a.valid ("name"), "Att::valid name -> fail");
|
||||
@@ -146,6 +146,14 @@ int main (int argc, char** argv)
|
||||
try {a6.mod ("endswith");} catch (...) {good = false;}
|
||||
t.ok (good, "Att::mod (endswith)");
|
||||
|
||||
good = true;
|
||||
try {a6.mod ("word");} catch (...) {good = false;}
|
||||
t.ok (good, "Att::mod (word)");
|
||||
|
||||
good = true;
|
||||
try {a6.mod ("noword");} catch (...) {good = false;}
|
||||
t.ok (good, "Att::mod (noword)");
|
||||
|
||||
good = true;
|
||||
try {a6.mod ("fartwizzle");} catch (...) {good = false;}
|
||||
t.notok (good, "Att::mod (fartwizzle)");
|
||||
|
||||
Reference in New Issue
Block a user