def test_wordlist(self): e1 = StringExpansion('foo', None) e2 = StringExpansion('bar ', None) e3 = StringExpansion(' baz', None) w = WordlistFunction(None) w.append(e1) w.append(e2) w.append(e3) self.assertEqual(w.to_source(), '$(wordlist foo,bar , baz)')
def test_curly_brackets(self): e1 = Expansion(None) e1.appendstr('foo') e2 = Expansion(None) e2.appendstr('foo ( bar') f = WordlistFunction(None) f.append(e1) f.append(e2) self.assertEqual(f.to_source(), '${wordlist foo,foo ( bar}')