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

Method test_multiple_positionals

tests/test_matcher.py:77–86  ·  view source on GitHub ↗

each positional arg gets its own help text in definition order

(self)

Source from the content-addressed store, hash-verified

75 self.assertMatchSingle(cmd, s.find_man_page("withargs")[0], matchedresult)
76
77 def test_multiple_positionals(self):
78 """each positional arg gets its own help text in definition order"""
79 cmd = "withmultipos src.txt dst.txt"
80 matchedresult = [
81 MR(0, 12, "withmultipos synopsis", "withmultipos"),
82 MR(13, 20, "source file(s) to copy", "src.txt"),
83 MR(21, 28, "destination path", "dst.txt"),
84 ]
85
86 self.assertMatchSingle(cmd, s.find_man_page("withmultipos")[0], matchedresult)
87
88 def test_multiple_positionals_variadic(self):
89 """extra args beyond the defined positionals reuse the last one;

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected