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