Example #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))
Example #2
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))
Example #3
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))
Example #4
0
 def do_subdir_glob(self, *args, **kwargs):
     # subclasses can override this to test a different glob implementation
     return subdir_glob(*args, **kwargs)
Example #5
0
 def do_subdir_glob(self, *args, **kwargs):
     # subclasses can override this to test a different glob implementation
     return subdir_glob(*args, **kwargs)