#
# " " [white space]
# "non-white-space" [without any dollar signs]
+# '"with-space-or-not"' [without any dollar signs]
# "$" [single dollar sign]
#
_dollar_exps_str = r'\$[\$\(\)]|\$[_a-zA-Z][\.\w]*|\${[^}]*}'
_dollar_exps = re.compile(r'(%s)' % _dollar_exps_str)
-_separate_args = re.compile(r'(%s|\s+|[^\s\$]+|\$)' % _dollar_exps_str)
+_separate_args = re.compile(r'(%s|\s+|[^"\s\$]+|"[^"\$]+"|\$)' % _dollar_exps_str)
# This regular expression is used to replace strings of multiple white
# space characters in the string result from the scons_subst() function.
else:
self.next_word()
else:
+ if a[0] == '"' and a[-1] == '"':
+ a = a[1:-1]
self.expand(a, lvars, within_list)
else:
self.expand(args, lvars, within_list)
# Tests callables that don't match our calling arguments.
'$CALLABLE', 'callable-1',
+
+ # Test handling of quotes.
+ 'aaa "bbb ccc" ddd', 'aaa "bbb ccc" ddd',
]
kwargs = {'target' : target, 'source' : source,
# Test callables that don't match our calling arguments.
'$CALLABLE', [['callable-2']],
+
+ # Test handling of quotes.
+ 'aaa "bbb ccc" ddd', [['aaa', 'bbb ccc', 'ddd']],
]
gvars = env.Dictionary()