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)
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)
def run(self, s, expected, platform=None): assert_equal(compat_shell_quote(s, platform), expected)
def test_comat_shell_quote_darwin(input_string, expected_output): assert compat_shell_quote(input_string, "darwin") == expected_output
def test_comat_shell_quote_linux(input_string, expected_output): assert compat_shell_quote(input_string, "linux2") == expected_output
def test_compat_shell_quote_windows(input_string, expected_output): assert compat_shell_quote(input_string, "win32") == expected_output