diff options
author | 2018-07-13 08:00:18 -0700 | |
---|---|---|
committer | 2018-07-13 08:02:11 -0700 | |
commit | 79aa7b4d67893ad347ab40d06323dfe5503ac51e (patch) | |
tree | ecd3120a72f9fb82e1ba1e9cae85d2ae2e863b65 /src/test/java/com/google | |
parent | bbf8c996b9c45e04c047e8ddb22454b29fae7f6b (diff) |
Fix Skydoc's following of imports to correctly process absolute labels.
Previously, any absolute label (starting with double slash) would be converted to an absolute path, instead of a path relative to the current workspace directory.
RELNOTES: None.
PiperOrigin-RevId: 204472080
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/skydoc/SkydocTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java b/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java index 185547d580..0047e820b4 100644 --- a/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java +++ b/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java @@ -50,7 +50,7 @@ public final class SkydocTest extends SkylarkTestCase { @Override public ParserInputSource inputSource(String pathString) throws IOException { - Path path = fileSystem.getPath(pathString); + Path path = fileSystem.getPath("/" + pathString); byte[] bytes = FileSystemUtils.asByteSource(path).read(); return ParserInputSource.create(bytes, path.asFragment()); } @@ -232,6 +232,6 @@ public final class SkydocTest extends SkylarkTestCase { ruleInfoMapBuilder, ImmutableList.builder())); - assertThat(expected).hasMessageThat().contains("cycle with /test/main.bzl"); + assertThat(expected).hasMessageThat().contains("cycle with test/main.bzl"); } } |