mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
More work on getting integration tests running for v2
This commit is contained in:
parent
6326daa34e
commit
02bc014bcd
27 changed files with 414 additions and 187 deletions
|
@ -40,7 +40,20 @@ def parse_kv(args, check_raw=False):
|
|||
raw_params = []
|
||||
for x in vargs:
|
||||
if "=" in x:
|
||||
k, v = x.split("=", 1)
|
||||
pos = 0
|
||||
try:
|
||||
while True:
|
||||
pos = x.index('=', pos + 1)
|
||||
if pos > 0 and x[pos - 1] != '\\':
|
||||
break
|
||||
except ValueError:
|
||||
# ran out of string, but we must have some escaped equals,
|
||||
# so replace those and append this to the list of raw params
|
||||
raw_params.append(x.replace('\\=', '='))
|
||||
continue
|
||||
|
||||
k = x[:pos]
|
||||
v = x[pos + 1:]
|
||||
|
||||
# only internal variables can start with an underscore, so
|
||||
# we don't allow users to set them directy in arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue