MCPcopy Create free account
hub / github.com/idank/explainshell / test_unknown_arg

Method test_unknown_arg

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

Source from the content-addressed store, hash-verified

293 self.assertMatchSingle(cmd, s.find_man_page("bar")[0], matchedresult)
294
295 def test_unknown_arg(self):
296 matchedresult = [MR(0, 3, "bar synopsis", "bar"), MR(4, 6, None, "-x")]
297 self.assertMatchSingle("bar -x", s.find_man_page("bar")[0], matchedresult)
298
299 # merges
300 matchedresult = [MR(0, 3, "bar synopsis", "bar"), MR(4, 10, None, "-x --x")]
301 self.assertMatchSingle("bar -x --x", s.find_man_page("bar")[0], matchedresult)
302
303 matchedresult = [MR(0, 3, "bar synopsis", "bar"), MR(4, 8, None, "-xyz")]
304 self.assertMatchSingle("bar -xyz", s.find_man_page("bar")[0], matchedresult)
305
306 matchedresult = [
307 MR(0, 3, "bar synopsis", "bar"),
308 MR(4, 6, None, "-x"),
309 MR(6, 7, "-a desc", "a"),
310 MR(7, 8, None, "z"),
311 ]
312
313 self.assertMatchSingle("bar -xaz", s.find_man_page("bar")[0], matchedresult)
314
315 def test_merge_same_match(self):
316 matchedresult = [MR(0, 3, "bar synopsis", "bar"), MR(4, 8, "-a desc", "-aaa")]

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected