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

Method test_nested_command_is_unknown

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

Source from the content-addressed store, hash-verified

524 self.assertEqual(groups[3].results, matchedresult[2])
525
526 def test_nested_command_is_unknown(self):
527 cmd = "withargs -b arg unknown"
528
529 matchedresult = [
530 MR(0, 8, "withargs synopsis", "withargs"),
531 MR(9, 15, "-b <arg> desc", "-b arg"),
532 MR(16, 23, "FILE argument", "unknown"),
533 ]
534
535 groups = matcher.Matcher(cmd, s).match()
536 self.assertEqual(len(groups), 2)
537 self.assertEqual(groups[0].results, [])
538 self.assertEqual(groups[1].results, matchedresult)
539
540 def test_unparsed(self):
541 cmd = "(bar; bar) c"

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected