def test_search_dirs_sysroot(self):
        with mock.patch('bfg9000.shell.execute', mock_execute):
            ld = LdLinker(None, self.env, ['ld'], 'version')
            self.assertEqual(ld.search_dirs(sysroot='/sysroot'),
                             [abspath('/dir1'), abspath('/sysroot/dir2')])