def test_expansion_simple(self): e = Expansion() e.appendstr('foo') e.appendstr('bar') v = VariableRef(None, e) self.assertEqual(v.to_source(), '$(foobar)')
def test_basename(self): e1 = StringExpansion('foo', None) v = VariableRef(None, e1) e2 = Expansion(None) e2.appendfunc(v) b = BasenameFunction(None) b.append(e2) self.assertEqual(b.to_source(), '$(basename $(foo))')
def test_special_variable(self): e = StringExpansion('<', None) v = VariableRef(None, e) self.assertEqual(v.to_source(), '$<')
def test_string_name(self): e = StringExpansion('foo', None) v = VariableRef(None, e) self.assertEqual(v.to_source(), '$(foo)')