mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-29 05:41:25 -07:00
ansible-config: add simple tests (#34900)
* Revert "Fix ansible-config with python3 (#34673)"
This reverts commit 2a9daaa45b
.
* ansible-config: add simple tests
* Fix ansible-config with python3
* ansible-test: don't quote "unusual" characters
This commit is contained in:
parent
93acd7c651
commit
217ff4498c
5 changed files with 19 additions and 6 deletions
|
@ -18,13 +18,16 @@ class Git(object):
|
|||
self.args = args
|
||||
self.git = 'git'
|
||||
|
||||
def get_diff(self, args):
|
||||
def get_diff(self, args, git_options=None):
|
||||
"""
|
||||
:type args: list[str]
|
||||
:type options: list[str]
|
||||
:rtype: list[str]
|
||||
"""
|
||||
cmd = ['diff'] + args
|
||||
return self.run_git_split(cmd, '\n', str_errors='replace')
|
||||
if git_options is None:
|
||||
git_options = ['-c', 'core.quotePath=']
|
||||
return self.run_git_split(git_options + cmd, '\n', str_errors='replace')
|
||||
|
||||
def get_diff_names(self, args):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue