TW-1584: attr.{isnt,not} use partial matching
- Change attr.{isnt,not} to be the exact opposite of attr{:is,:},
i.e. exact matching.
- Fix tests that assumed the old behavior was intended.
This commit is contained in:
@@ -66,7 +66,7 @@ unlike ($output, qr/two/, "$ut: list - two included");
|
||||
|
||||
$output = qx{../src/task rc:$rc list pro.not:a 2>&1};
|
||||
like ($output, qr/zero/, "$ut: list - zero included");
|
||||
unlike ($output, qr/one/, "$ut: list - one excluded");
|
||||
like ($output, qr/one/, "$ut: list - one included");
|
||||
unlike ($output, qr/two/, "$ut: list - two excluded");
|
||||
|
||||
$output = qx{../src/task rc:$rc list pro.not:a.b 2>&1};
|
||||
|
||||
@@ -79,9 +79,9 @@ class TestFilterPrefix(TestCase):
|
||||
def test_list_project_not_foo(self):
|
||||
"""Filter on not project name."""
|
||||
code, out, err = self.t(('list', 'project.not:foo'))
|
||||
self.assertNotIn('one', out)
|
||||
self.assertNotIn('two', out)
|
||||
self.assertNotIn('three', out)
|
||||
self.assertIn('one', out)
|
||||
self.assertIn('two', out)
|
||||
self.assertIn('three', out)
|
||||
self.assertIn('four', out)
|
||||
self.assertIn('five', out)
|
||||
self.assertIn('six', out)
|
||||
@@ -112,18 +112,6 @@ class TestFilterPrefix(TestCase):
|
||||
self.assertIn('seven', out)
|
||||
self.assertIn('eight', out)
|
||||
|
||||
def test_list_project_not_ba(self):
|
||||
"""Filter on project partial non-match."""
|
||||
code, out, err = self.t(('list', 'project.not:ba'))
|
||||
self.assertIn('one', out)
|
||||
self.assertIn('two', out)
|
||||
self.assertIn('three', out)
|
||||
self.assertNotIn('four', out)
|
||||
self.assertNotIn('five', out)
|
||||
self.assertNotIn('six', out)
|
||||
self.assertNotIn('seven', out)
|
||||
self.assertNotIn('eight', out)
|
||||
|
||||
def test_list_description_has_foo(self):
|
||||
"""Filter on description pattern."""
|
||||
code, out, err = self.t(('list', 'description.has:foo'))
|
||||
|
||||
Reference in New Issue
Block a user