def testClassFishScript(self): script = completion.Script('', tc.MixedDefaults, shell='fish') self.assertIn('ten', script) self.assertIn('sum', script) self.assertIn('identity', script) self.assertIn('alpha', script) self.assertIn('beta', script)
def testDeepDictFishScript(self): deepdict = {'level1': {'level2': {'level3': {'level4': {}}}}} script = completion.Script('deepdict', deepdict, shell='fish') self.assertIn('level1', script) self.assertIn('level2', script) self.assertIn('level3', script) self.assertNotIn('level4', script) # The default depth is 3.
def testClassFishScript(self): script = completion.Script("", tc.MixedDefaults, shell="fish") self.assertIn("ten", script) self.assertIn("sum", script) self.assertIn("identity", script) self.assertIn("alpha", script) self.assertIn("beta", script)
def testClassScript(self): script = completion.Script('', tc.MixedDefaults) self.assertIn('ten', script) self.assertIn('sum', script) self.assertIn('identity', script) self.assertIn('--alpha', script) self.assertIn('--beta', script)
def testDeepDictFishScript(self): deepdict = {"level1": {"level2": {"level3": {"level4": {}}}}} script = completion.Script("deepdict", deepdict, shell="fish") self.assertIn("level1", script) self.assertIn("level2", script) self.assertIn("level3", script) self.assertNotIn("level4", script) # The default depth is 3.
def testClassScript(self): script = completion.Script("", tc.MixedDefaults) self.assertIn("ten", script) self.assertIn("sum", script) self.assertIn("identity", script) self.assertIn("--alpha", script) self.assertIn("--beta", script)
def CompletionScript(name, component): """Returns the text of the Bash completion script for a Fire CLI.""" return completion.Script(name, component)
def CompletionScript(name, component, shell): """Returns the text of the completion script for a Fire CLI.""" return completion.Script(name, component, shell=shell)
def testFnFishScript(self): script = completion.Script('identity', tc.identity, shell='fish') self.assertIn('arg1', script) self.assertIn('arg2', script) self.assertIn('arg3', script) self.assertIn('arg4', script)
def testFnScript(self): script = completion.Script('identity', tc.identity) self.assertIn('--arg1', script) self.assertIn('--arg2', script) self.assertIn('--arg3', script) self.assertIn('--arg4', script)
def testFnFishScript(self): script = completion.Script("identity", tc.identity, shell="fish") self.assertIn("arg1", script) self.assertIn("arg2", script) self.assertIn("arg3", script) self.assertIn("arg4", script)
def testFnScript(self): script = completion.Script("identity", tc.identity) self.assertIn("--arg1", script) self.assertIn("--arg2", script) self.assertIn("--arg3", script) self.assertIn("--arg4", script)