Ejemplo n.º 1
0
 def test_subdir_glob_with_prefix(self):
     build_env = BuildFileContext(None, None, None, None, None, None, None, None, None)
     search_base = self.fake_path(
         'foo',
         glob_results={
             'lib/bar/*.h': ['lib/bar/A.h', 'lib/bar/B.h'],
         })
     self.assertGlobMatches(
         {
             'Prefix/bar/B.h': 'lib/bar/B.h',
             'Prefix/bar/A.h': 'lib/bar/A.h',
         },
         subdir_glob([('lib', 'bar/*.h')],
                     prefix='Prefix',
                     build_env=build_env,
                     search_base=search_base))
Ejemplo n.º 2
0
 def test_subdir_glob(self):
     build_env = BuildFileContext(self.fake_path(''), None, None, None, None, [], None, None, None, None, None)
     search_base = self.fake_path(
         'foo',
         glob_results={
             'lib/bar/*.h': ['lib/bar/A.h', 'lib/bar/B.h'],
             'lib/baz/*.h': ['lib/baz/C.h', 'lib/baz/D.h'],
         })
     self.assertGlobMatches(
         {
             'bar/B.h': 'lib/bar/B.h',
             'bar/A.h': 'lib/bar/A.h',
             'baz/D.h': 'lib/baz/D.h',
             'baz/C.h': 'lib/baz/C.h',
         },
         subdir_glob([
             ('lib', 'bar/*.h'),
             ('lib', 'baz/*.h')],
             build_env=build_env,
             search_base=search_base))