MCPcopy Index your code
hub / github.com/idank/explainshell / test_multiple_matches

Method test_multiple_matches

tests/test_matcher.py:373–383  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

371 self.assertMatchSingle(cmd, s.find_man_page("bar foo")[0], matchedresult)
372
373 def test_multiple_matches(self):
374 cmd = "dup -ab"
375 matchedresult = [
376 MR(0, 3, "dup1 synopsis", "dup"),
377 MR(4, 6, "-a desc", "-a"),
378 MR(6, 7, "-b <arg> desc", "b"),
379 ]
380
381 groups = matcher.Matcher(cmd, s).match()
382 self.assertEqual(groups[1].results, matchedresult)
383 self.assertEqual(groups[1].suggestions[0].source, "ubuntu/26.04/2/dup.2.gz")
384
385 def test_arguments(self):
386 cmd = "withargs -x -b freearg freearg"

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected