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

Method test_arguments

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

Source from the content-addressed store, hash-verified

383 self.assertEqual(groups[1].suggestions[0].source, "ubuntu/26.04/2/dup.2.gz")
384
385 def test_arguments(self):
386 cmd = "withargs -x -b freearg freearg"
387 matchedresult = [
388 MR(0, 8, "withargs synopsis", "withargs"),
389 # tokens that look like options are still unknown
390 MR(9, 11, None, "-x"),
391 MR(12, 22, "-b <arg> desc", "-b freearg"),
392 MR(23, 30, "FILE argument", "freearg"),
393 ]
394
395 self.assertMatchSingle(cmd, s.find_man_page("withargs")[0], matchedresult)
396
397 def test_arg_is_dash(self):
398 cmd = "bar -b - -a -"

Callers

nothing calls this directly

Calls 2

assertMatchSingleMethod · 0.95
find_man_pageMethod · 0.45

Tested by

no test coverage detected