Example #1
0
 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']
         }))
Example #2
0
 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']}))
Example #3
0
 def test_replacement_strings(self):
     self.assertEqual(['foo', 'bar'],
                      ibb.subst(['{v1}', '{v2}'], {
                          'v1': 'foo',
                          'v2': 'bar'
                      }))
Example #4
0
 def test_literal_strings(self):
     self.assertEqual(['foo', 'bar'], ibb.subst(['foo', 'bar'], {}))
Example #5
0
 def test_empty_list(self):
     self.assertEqual([], ibb.subst([], {}))
Example #6
0
 def test_replacement_strings(self):
     self.assertEqual(
         ['foo', 'bar'],
         ibb.subst(
             ['{v1}', '{v2}'],
             {'v1': 'foo', 'v2': 'bar'}))
Example #7
0
 def test_literal_strings(self):
     self.assertEqual(['foo', 'bar'], ibb.subst(['foo', 'bar'], {}))
Example #8
0
 def test_empty_list(self):
     self.assertEqual([], ibb.subst([], {}))