Add permitted_when_isolated_path to linker namespaces
The permitted_when_isolated_path is a way to white-list directories not present in search-path. It is ignored for not isolated namespaces. Bug: http://b/25853516 Bug: http://b/22548808 Change-Id: Ib1538037268eea69323ea49968a34a4a1d1938a5
This commit is contained in:
@@ -54,6 +54,18 @@ TEST(linker_utils, file_is_in_dir_smoke) {
|
||||
ASSERT_FALSE(file_is_in_dir("/file", "/"));
|
||||
}
|
||||
|
||||
TEST(linker_utils, file_is_under_dir_smoke) {
|
||||
ASSERT_TRUE(file_is_under_dir("/foo/bar/file", "/foo/bar"));
|
||||
ASSERT_TRUE(file_is_under_dir("/foo/bar/file", "/foo"));
|
||||
|
||||
ASSERT_FALSE(file_is_under_dir("/foo/bar/file", "/bar/foo"));
|
||||
|
||||
ASSERT_TRUE(file_is_under_dir("/file", ""));
|
||||
ASSERT_TRUE(file_is_under_dir("/foo/bar/file", ""));
|
||||
ASSERT_FALSE(file_is_under_dir("/file", "/"));
|
||||
ASSERT_FALSE(file_is_under_dir("/foo/bar/file", "/"));
|
||||
}
|
||||
|
||||
TEST(linker_utils, parse_zip_path_smoke) {
|
||||
std::string zip_path;
|
||||
std::string entry_path;
|
||||
|
Reference in New Issue
Block a user