Ejemplo n.º 1
0
 def __call__(self, args, parsed_globals):
     command_components = [self._alias_value[1:]]
     command_components.extend(compat_shell_quote(a) for a in args)
     command = ' '.join(command_components)
     LOG.debug('Using external alias %r with value: %r to run: %r',
               self._alias_name, self._alias_value, command)
     return self._invoker(command, shell=True)
Ejemplo n.º 2
0
 def __call__(self, args, parsed_globals):
     command_components = [
         self._alias_value[1:]
     ]
     command_components.extend(compat_shell_quote(a) for a in args)
     command = ' '.join(command_components)
     LOG.debug(
         'Using external alias %r with value: %r to run: %r',
         self._alias_name, self._alias_value, command)
     return self._invoker(command, shell=True)
Ejemplo n.º 3
0
 def run(self, s, expected, platform=None):
     assert_equal(compat_shell_quote(s, platform), expected)
Ejemplo n.º 4
0
def test_comat_shell_quote_darwin(input_string, expected_output):
    assert compat_shell_quote(input_string, "darwin") == expected_output
Ejemplo n.º 5
0
def test_comat_shell_quote_linux(input_string, expected_output):
    assert compat_shell_quote(input_string, "linux2") == expected_output
Ejemplo n.º 6
0
def test_compat_shell_quote_windows(input_string, expected_output):
    assert compat_shell_quote(input_string, "win32") == expected_output
Ejemplo n.º 7
0
 def run(self, s, expected, platform=None):
     assert_equal(compat_shell_quote(s, platform), expected)