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

Method test_prefixed_positional_reuse

tests/test_matcher.py:134–143  ·  view source on GitHub ↗

multiple prefixed tokens may claim the same positional (adjacent matches with the same text get merged)

(self)

Source from the content-addressed store, hash-verified

132 self.assertMatchSingle(cmd, s.find_man_page("withprefixpos")[0], matchedresult)
133
134 def test_prefixed_positional_reuse(self):
135 """multiple prefixed tokens may claim the same positional (adjacent
136 matches with the same text get merged)"""
137 cmd = "withprefixpos @a @b"
138 matchedresult = [
139 MR(0, 13, "withprefixpos synopsis", "withprefixpos"),
140 MR(14, 19, "server to query", "@a @b"),
141 ]
142
143 self.assertMatchSingle(cmd, s.find_man_page("withprefixpos")[0], matchedresult)
144
145 def test_prefixed_token_no_declared_prefix(self):
146 """a token bearing a sigil no positional declares falls through to

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected