Modifiers: "is" and "isnt" are now exact/inexact operators
This commit is contained in:
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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user