def test_subst_passes_lists_through(self): self.assertEqual( ['begin', 'ibb.exe', 'ibb.cpp', 'ibbcommon.cpp', 'end'], ibb.subst(['begin', '{targets[0]}', '{sources}', 'end'], { 'targets': ['ibb.exe'], 'sources': ['ibb.cpp', 'ibbcommon.cpp'] }))
def test_subst_passes_lists_through(self): self.assertEqual( ['begin', 'ibb.exe', 'ibb.cpp', 'ibbcommon.cpp', 'end'], ibb.subst( ['begin', '{targets[0]}', '{sources}', 'end'], {'targets': ['ibb.exe'], 'sources': ['ibb.cpp', 'ibbcommon.cpp']}))
def test_replacement_strings(self): self.assertEqual(['foo', 'bar'], ibb.subst(['{v1}', '{v2}'], { 'v1': 'foo', 'v2': 'bar' }))
def test_literal_strings(self): self.assertEqual(['foo', 'bar'], ibb.subst(['foo', 'bar'], {}))
def test_empty_list(self): self.assertEqual([], ibb.subst([], {}))
def test_replacement_strings(self): self.assertEqual( ['foo', 'bar'], ibb.subst( ['{v1}', '{v2}'], {'v1': 'foo', 'v2': 'bar'}))