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

Method test_prefixed_positional_first

tests/test_matcher.py:123–132  ·  view source on GitHub ↗

a prefixed token in first position doesn't consume the ordered pool

(self)

Source from the content-addressed store, hash-verified

121 self.assertMatchSingle(cmd, s.find_man_page("withprefixpos")[0], matchedresult)
122
123 def test_prefixed_positional_first(self):
124 """a prefixed token in first position doesn't consume the ordered pool"""
125 cmd = "withprefixpos @8.8.8.8 foo.bar"
126 matchedresult = [
127 MR(0, 13, "withprefixpos synopsis", "withprefixpos"),
128 MR(14, 22, "server to query", "@8.8.8.8"),
129 MR(23, 30, "name of the resource record", "foo.bar"),
130 ]
131
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

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected