diff options
author | David Chen <dzc@google.com> | 2016-08-16 08:43:43 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-08-16 15:21:34 +0000 |
commit | 60af9dba69da660407489f30a842b32b56266a28 (patch) | |
tree | f5d4166a9d1c0171e29df1fe3131bcf1af1e0ead /src/test/java/com | |
parent | 753bcacfb7da3b04c68a30f11b9162653163ef3b (diff) |
Deprecate the ${link page.heading} syntax for referencing BE static pages.
--
MOS_MIGRATED_REVID=130374987
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/google/devtools/build/docgen/RuleLinkExpanderTest.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/test/java/com/google/devtools/build/docgen/RuleLinkExpanderTest.java b/src/test/java/com/google/devtools/build/docgen/RuleLinkExpanderTest.java index 0e686e268d..ed08c34b0a 100644 --- a/src/test/java/com/google/devtools/build/docgen/RuleLinkExpanderTest.java +++ b/src/test/java/com/google/devtools/build/docgen/RuleLinkExpanderTest.java @@ -79,26 +79,18 @@ public class RuleLinkExpanderTest { assertEquals(expected, expander.expand(docs)); } - @Test public void testStaticPageWithHeadingRef() { - String docs = "<a href=\"${link common-definitions.label-expansion}\">Label Expansion</a>"; - String expected = "<a href=\"common-definitions.html#label-expansion\">Label Expansion</a>"; - assertEquals(expected, expander.expand(docs)); - } - - @Test public void testStaticPageWithPeriodsInHeading() { - String docs = - "<a href=\"${link make-variables.predefined_variables.genrule.cmd}\">genrule cmd</a>"; - String expected = - "<a href=\"make-variables.html#predefined_variables.genrule.cmd\">genrule cmd</a>"; - assertEquals(expected, expander.expand(docs)); - } - @Test(expected = IllegalArgumentException.class) public void testRefNotFound() { String docs = "<a href=\"${link foo.bar}\">bar</a>"; expander.expand(docs); } + @Test(expected = IllegalArgumentException.class) + public void testIncorrectStaticPageHeadingLink() { + String docs = "<a href=\"${link common-definitions.label-expansion}\">Label Expansion</a>"; + expander.expand(docs); + } + @Test public void testRuleHeadingLink() { String docs = "<a href=\"${link cc_library#alwayslink_lib_example}\">examples</a>"; String expected = "<a href=\"c-cpp.html#alwayslink_lib_example\">examples</a>"; |