--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Tue Mar 06 17:43:21 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Tue Mar 06 10:45:47 2018 -0800
@@ -24,7 +24,7 @@
/*
* @test
* @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
- * 8181622 8182263 8074407 8187521 8198522
+ * 8181622 8182263 8074407 8187521 8198522 8182765
* @summary Test the search feature of javadoc.
* @author bpatel
* @library ../lib
@@ -41,7 +41,10 @@
@Test
void test1() {
- javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java"));
+ javadoc("-d", "out-1",
+ "-sourcepath",
+ "-use",
+ testSrc("UnnamedPkgClass.java"));
checkExit(Exit.OK);
checkSearchOutput("UnnamedPkgClass.html", true, true);
checkJqueryAndImageFiles(true);
@@ -60,12 +63,15 @@
@Test
void test2() {
- javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-2",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkInvalidUsageIndexTag();
checkSearchOutput(true);
- checkSingleIndex(true, false);
+ checkSingleIndex(true, true);
checkSingleIndexSearchTagDuplication();
checkJqueryAndImageFiles(true);
checkSearchJS();
@@ -81,13 +87,28 @@
}
@Test
+ void test2_html4() {
+ javadoc("-d", "out-2-html4",
+ "-html4",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkExit(Exit.OK);
+ checkSingleIndex(true, false);
+ }
+
+ @Test
void test2a() {
- javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-2a",
+ "-Xdoclint:all",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.ERROR);
checkDocLintErrors();
checkSearchOutput(true);
- checkSingleIndex(true, false);
+ checkSingleIndex(true, true);
checkSingleIndexSearchTagDuplication();
checkJqueryAndImageFiles(true);
checkSearchJS();
@@ -103,10 +124,24 @@
}
@Test
+ void test2a_html4() {
+ javadoc("-d", "out-2a-html4",
+ "-html4",
+ "-Xdoclint:all",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkSingleIndex(true, false);
+ }
+
+ @Test
void test3() {
- javadoc("-d", "out-3", "-noindex", "-Xdoclint:none",
+ javadoc("-d", "out-3",
+ "-noindex",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(false);
checkJqueryAndImageFiles(false);
@@ -124,9 +159,12 @@
@Test
void test4() {
- javadoc("-d", "out-4", "-html5", "-Xdoclint:none",
+ javadoc("-d", "out-4",
+ "-html5",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkSingleIndex(true, true);
@@ -146,9 +184,13 @@
@Test
void test5() {
- javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none",
+ javadoc("-d", "out-5",
+ "-html5",
+ "-noindex",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(false);
checkJqueryAndImageFiles(false);
@@ -166,9 +208,12 @@
@Test
void test6() {
- javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none",
+ javadoc("-d", "out-6",
+ "-nocomment",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkIndexNoComment();
@@ -187,9 +232,12 @@
@Test
void test7() {
- javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none",
+ javadoc("-d", "out-7",
+ "-nodeprecated",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkIndexNoDeprecated();
@@ -208,8 +256,12 @@
@Test
void test8() {
- javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-8",
+ "-splitindex",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkInvalidUsageIndexTag();
checkSearchOutput(true);
@@ -230,8 +282,12 @@
@Test
void test9() {
- javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package",
- "-use", "pkgfx", "pkg3");
+ javadoc("-d", "out-9",
+ "-sourcepath", testSrc,
+ "-javafx",
+ "-package",
+ "-use",
+ "pkgfx", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkJavaFXOutput();
@@ -386,7 +442,7 @@
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>");
checkOutput("index-files/index-5.html", true,
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
- + "#html-span-see-/span-\">html <span> see </span></a></span> - Search "
+ + "#html%3Cspan%3Esee%3C/span%3E\">html <span> see </span></a></span> - Search "
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>");
checkOutput("index-files/index-11.html", true,
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>"