MCPcopy
hub / github.com/idank/explainshell / test_positional_name_match

Method test_positional_name_match

tests/test_matcher.py:100–108  ·  view source on GitHub ↗

a word that exactly matches a positional key uses that key's text

(self)

Source from the content-addressed store, hash-verified

98 self.assertMatchSingle(cmd, s.find_man_page("withmultipos")[0], matchedresult)
99
100 def test_positional_name_match(self):
101 """a word that exactly matches a positional key uses that key's text"""
102 cmd = "withmultipos DEST"
103 matchedresult = [
104 MR(0, 12, "withmultipos synopsis", "withmultipos"),
105 MR(13, 17, "destination path", "DEST"),
106 ]
107
108 self.assertMatchSingle(cmd, s.find_man_page("withmultipos")[0], matchedresult)
109
110 def test_prefixed_positional_out_of_order(self):
111 """a prefixed token claims its positional regardless of position, and

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected