- Fixed bug that prevented 'task list priority.above:L' from working.
- Added unit tests.
This commit is contained in:
Paul Beckingham
2010-06-28 17:45:42 -04:00
parent 426eac97aa
commit 6ea6c79375
3 changed files with 129 additions and 0 deletions

View File

@@ -405,6 +405,9 @@ std::string Att::type (const std::string& name) const
else if (name == "limit")
return "number";
else if (name == "priority")
return "priority";
else
return "text";
}
@@ -604,6 +607,14 @@ bool Att::match (const Att& other) const
if (mValue <= other.mValue)
return false;
}
else if (which == "priority")
{
if (mValue == "" ||
other.mValue == "H" ||
mValue == other.mValue ||
(mValue == "L" && other.mValue == "M"))
return false;
}
}
// after = over = above = >
@@ -634,6 +645,14 @@ bool Att::match (const Att& other) const
if (mValue >= other.mValue)
return false;
}
else if (which == "priority")
{
if (mValue == "H" ||
other.mValue == "" ||
mValue == other.mValue ||
(mValue == "M" && other.mValue == "L"))
return false;
}
}
// word = contains as a substring, with word boundaries.