diff options
author | 2016-05-03 17:46:59 +0000 | |
---|---|---|
committer | 2016-05-03 21:33:26 +0000 | |
commit | 095fb1b05fc5934b426ebae47076a25ceaefe394 (patch) | |
tree | 1a9cbac0e4783eb6358478a8606c302b68c4c76a /src/test | |
parent | f296e87893a422cc5786982205027cc6ffe222c1 (diff) |
When creating the exec root symlink forest, take account of the empty package's package root when creating top-level directories. Otherwise, if the empty package references files in those top-level directories, they would be hidden.
Fixes #1221
--
MOS_MIGRATED_REVID=121392128
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/vfs/FileSystemUtilsTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/FileSystemUtilsTest.java b/src/test/java/com/google/devtools/build/lib/vfs/FileSystemUtilsTest.java index 28950bbc81..637cd18597 100644 --- a/src/test/java/com/google/devtools/build/lib/vfs/FileSystemUtilsTest.java +++ b/src/test/java/com/google/devtools/build/lib/vfs/FileSystemUtilsTest.java @@ -190,7 +190,7 @@ public class FileSystemUtilsTest { assertEquals("../../../file-4", relativePath(innerDir, file4).getPathString()); } - private String longestPathPrefixStr(String path, String... prefixStrs) { + private static String longestPathPrefixStr(String path, String... prefixStrs) { Set<PathFragment> prefixes = new HashSet<>(); for (String prefix : prefixStrs) { prefixes.add(new PathFragment(prefix)); @@ -207,6 +207,7 @@ public class FileSystemUtilsTest { assertNull(longestPathPrefixStr("C/b", "A", "B")); // not found in other parents assertNull(longestPathPrefixStr("A", "A/B", "B")); // not found in child assertEquals("A/B/C", longestPathPrefixStr("A/B/C/d/e/f.h", "A/B/C", "B/C/d")); + assertEquals("", longestPathPrefixStr("A/f.h", "", "B/C/d")); } @Test |