@ -314,7 +314,7 @@ basify(Element&& element)
|
|||||||
element.value = Element::Basic{field->name,
|
element.value = Element::Basic{field->name,
|
||||||
std::string{finfo->name}};
|
std::string{finfo->name}};
|
||||||
else
|
else
|
||||||
Element::Basic{*str};
|
element.value = Element::Basic{*str};
|
||||||
} else if (field == Field::Id::Priority) {
|
} else if (field == Field::Id::Priority) {
|
||||||
if (auto&& prio{priority_from_name(val)}; prio)
|
if (auto&& prio{priority_from_name(val)}; prio)
|
||||||
element.value = Element::Basic{field->name,
|
element.value = Element::Basic{field->name,
|
||||||
@ -444,7 +444,6 @@ process(const std::string& expr)
|
|||||||
.and_then(opify)
|
.and_then(opify)
|
||||||
.and_then(basify)
|
.and_then(basify)
|
||||||
.and_then(regexpify)
|
.and_then(regexpify)
|
||||||
//.and_then(phrasify)
|
|
||||||
.and_then(wildcardify)
|
.and_then(wildcardify)
|
||||||
.and_then(rangify);
|
.and_then(rangify);
|
||||||
if (element)
|
if (element)
|
||||||
@ -490,6 +489,7 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
#if BUILD_TESTS
|
#if BUILD_TESTS
|
||||||
/*
|
/*
|
||||||
|
*
|
||||||
* Tests.
|
* Tests.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -505,6 +505,7 @@ test_processor()
|
|||||||
// basics
|
// basics
|
||||||
TestCase{R"(hello world)", R"(((_ "hello") (_ "world")))"},
|
TestCase{R"(hello world)", R"(((_ "hello") (_ "world")))"},
|
||||||
TestCase{R"(maildir:/"hello world")", R"(((maildir "/hello world")))"},
|
TestCase{R"(maildir:/"hello world")", R"(((maildir "/hello world")))"},
|
||||||
|
TestCase{R"(flag:deleted)", R"(((_ "flag:deleted")))"} // non-existing flags
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto&& test: cases) {
|
for (auto&& test: cases) {
|
||||||
|
|||||||
Reference in New Issue
Block a user