a page whose only positional is prefixed: prefix token matches, non-prefix token goes unknown instead of raising on the empty pool
(self)
| 165 | self.assertMatchSingle(cmd, s.find_man_page("withprefixpos")[0], matchedresult) |
| 166 | |
| 167 | def test_only_prefixed_positional(self): |
| 168 | """a page whose only positional is prefixed: prefix token matches, |
| 169 | non-prefix token goes unknown instead of raising on the empty pool""" |
| 170 | cmd = "onlyprefixpos :1" |
| 171 | matchedresult = [ |
| 172 | MR(0, 13, "onlyprefixpos synopsis", "onlyprefixpos"), |
| 173 | MR(14, 16, "display to use", ":1"), |
| 174 | ] |
| 175 | |
| 176 | self.assertMatchSingle(cmd, s.find_man_page("onlyprefixpos")[0], matchedresult) |
| 177 | |
| 178 | cmd = "onlyprefixpos foo" |
| 179 | matchedresult = [ |
| 180 | MR(0, 13, "onlyprefixpos synopsis", "onlyprefixpos"), |
| 181 | MR(14, 17, None, "foo"), |
| 182 | ] |
| 183 | |
| 184 | self.assertMatchSingle(cmd, s.find_man_page("onlyprefixpos")[0], matchedresult) |
| 185 | |
| 186 | def test_reset_current_option_if_argument_taken(self): |
| 187 | cmd = "withargs -ab12 arg" |
nothing calls this directly
no test coverage detected