diff --git a/src/CLI2.cpp b/src/CLI2.cpp index ec438207a..bc94d0e61 100644 --- a/src/CLI2.cpp +++ b/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", "~"); diff --git a/test/project.t b/test/project.t index 2678fbbd1..d746b246c 100755 --- a/test/project.t +++ b/test/project.t @@ -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")