示例#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']
         }))
示例#2
0
文件: ibbtest.py 项目: chadaustin/ibb
 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']}))
示例#3
0
 def test_replacement_strings(self):
     self.assertEqual(['foo', 'bar'],
                      ibb.subst(['{v1}', '{v2}'], {
                          'v1': 'foo',
                          'v2': 'bar'
                      }))
示例#4
0
 def test_literal_strings(self):
     self.assertEqual(['foo', 'bar'], ibb.subst(['foo', 'bar'], {}))
示例#5
0
 def test_empty_list(self):
     self.assertEqual([], ibb.subst([], {}))
示例#6
0
文件: ibbtest.py 项目: chadaustin/ibb
 def test_replacement_strings(self):
     self.assertEqual(
         ['foo', 'bar'],
         ibb.subst(
             ['{v1}', '{v2}'],
             {'v1': 'foo', 'v2': 'bar'}))
示例#7
0
文件: ibbtest.py 项目: chadaustin/ibb
 def test_literal_strings(self):
     self.assertEqual(['foo', 'bar'], ibb.subst(['foo', 'bar'], {}))
示例#8
0
文件: ibbtest.py 项目: chadaustin/ibb
 def test_empty_list(self):
     self.assertEqual([], ibb.subst([], {}))