def test_multiline(self): s = 'hello\nworld' foo = StringExpansion('FOO', None) v = SetVariable(foo, '=', s, None, None) self.assertEqual(v.to_source(), 'define FOO\nhello\nworld\nendef')
def test_target_specific(self): foo = StringExpansion('FOO', None) bar = StringExpansion('BAR', None) v = SetVariable(foo, '+=', 'value', None, bar) self.assertEqual(v.to_source(), 'BAR: FOO += value')
def test_simple(self): v = SetVariable(StringExpansion('foo', None), '=', 'bar', None, None) self.assertEqual(v.to_source(), 'foo = bar')