env=self.env,
for_signature=(self.mode != SUBST_CMD))
self.substitute(s, lvars, within_list)
- elif not s is None:
+ elif s is None:
+ self.this_word()
+ else:
self.append(s)
def substitute(self, args, lvars, within_list):
def add_to_current_word(self, x):
if not self.in_strip or self.mode != SUBST_SIG:
- self[-1][-1] = self[-1][-1] + x
+ try:
+ self[-1][-1] = self[-1][-1] + x
+ except IndexError:
+ self.add_new_word(x)
def add_new_word(self, x):
if not self.in_strip or self.mode != SUBST_SIG:
try:
# Test function calls within ${}.
'$FUNCCALL', 'a xc b',
+
+ # Bug reported by Christoph Wiedemann.
+ '$xxx/bin', '/bin',
]
kwargs = {'target' : target, 'source' : source}
'foo\n\nbar', [['foo'], ['bar']],
'foo \n \n bar', [['foo'], ['bar']],
'foo \nmiddle\n bar', [['foo'], ['middle'], ['bar']],
+
+ # Bug reported by Christoph Wiedemann.
+ '$xxx/bin', [['/bin']],
]
kwargs = {'target' : target, 'source' : source}