mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Modifiers: "is" and "isnt" are now exact/inexact operators
This commit is contained in:
parent
733e4e5aff
commit
358e0cc62d
2 changed files with 8 additions and 8 deletions
14
src/CLI2.cpp
14
src/CLI2.cpp
|
@ -1168,21 +1168,21 @@ void CLI2::desugarFilterAttributes ()
|
|||
op.attribute ("raw", "!==");
|
||||
rhs.attribute ("raw", "''");
|
||||
}
|
||||
else if (mod == "is")
|
||||
{
|
||||
op.attribute ("raw", "=");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "equals")
|
||||
else if (mod == "is" || mod == "equals")
|
||||
{
|
||||
op.attribute ("raw", "==");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "isnt" || mod == "not")
|
||||
else if (mod == "not")
|
||||
{
|
||||
op.attribute ("raw", "!=");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "isnt")
|
||||
{
|
||||
op.attribute ("raw", "!==");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "has" || mod == "contains")
|
||||
{
|
||||
op.attribute ("raw", "~");
|
||||
|
|
|
@ -189,7 +189,7 @@ class TestBug299(TestCase):
|
|||
code, out, err = self.t("list project.isnt:one pro.isnt:two")
|
||||
|
||||
self.assertNotRegexpMatches(out, "one.*foo")
|
||||
self.assertNotRegexpMatches(out, "ones.*faz")
|
||||
self.assertRegexpMatches(out, "ones.*faz")
|
||||
self.assertRegexpMatches(out, "phone.*boo")
|
||||
self.assertRegexpMatches(out, "bones.*too")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue