Skip to content

Commit

Permalink
test(cli: multiword filter for too short queries): change mailman to …
Browse files Browse the repository at this point in the history
…mailman-core-git
  • Loading branch information
actionless committed Jan 2, 2024
1 parent 139cbe8 commit 5360978
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pikaur_test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ def test_search_multiword_too_small_error(self):
self.assertEqual(len(result_aur_too_many), 0)

def test_search_multiword_too_filter(self):
result_for_one_query = pikaur("-Ssq --aur mailman").stdout.splitlines()
self.assertIn("mailman-rss", result_for_one_query)
self.assertIn("mailman", result_for_one_query)

result_all = pikaur("-Ssq --aur mailman w").stdout.splitlines()
self.assertIn("mailman-rss", result_all)
self.assertNotIn("mailman", result_all)
common_query = "mailman"
specific_query = "w"
common_result = "mailman-core-git"
specific_result = "mailman-rss"
result_for_one_query = pikaur(f"-Ssq --aur {common_query}").stdout.splitlines()
self.assertIn(specific_result, result_for_one_query)
self.assertIn(common_result, result_for_one_query)

result_all = pikaur(f"-Ssq --aur {common_query} {specific_query}").stdout.splitlines()
self.assertIn(specific_result, result_all)
self.assertNotIn(common_result, result_all)

def test_search_multiword_too_filter_namesonly(self):
result_all = pikaur("-Ssq --aur mailman w").stdout.splitlines()
Expand Down

0 comments on commit 5360978

Please sign in to comment.