2015-11-29 02:52:17 +00:00
|
|
|
/*
|
2017-01-26 21:01:12 +00:00
|
|
|
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
2015-11-29 02:52:17 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @test
|
2017-04-05 06:04:39 +00:00
|
|
|
* @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218
|
2015-11-29 02:52:17 +00:00
|
|
|
* @summary Test the search feature of javadoc.
|
|
|
|
* @author bpatel
|
|
|
|
* @library ../lib
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
Co-authored-by: Andreas Lundblad <andreas.lundblad@oracle.com>
Co-authored-by: Andrey Nazarov <andrey.x.nazarov@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Kumar Srinivasan <kumar.x.srinivasan@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: jjg, jlahoda, vromero, mcimadamore, bpatel, ksrini, darcy, anazarov, dfuchs
2016-03-17 19:04:28 +00:00
|
|
|
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
2015-11-29 02:52:17 +00:00
|
|
|
* @build JavadocTester
|
|
|
|
* @run main TestSearch
|
|
|
|
*/
|
|
|
|
public class TestSearch extends JavadocTester {
|
|
|
|
|
|
|
|
public static void main(String... args) throws Exception {
|
|
|
|
TestSearch tester = new TestSearch();
|
|
|
|
tester.runTests();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test1() {
|
|
|
|
javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java"));
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput("UnnamedPkgClass.html", true);
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(false,
|
|
|
|
"package-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"tag-search-index.zip",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test2() {
|
|
|
|
javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkInvalidUsageIndexTag();
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkSingleIndex(true);
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test2a() {
|
|
|
|
javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
2016-10-10 13:47:47 +00:00
|
|
|
checkExit(Exit.ERROR);
|
2015-11-29 02:52:17 +00:00
|
|
|
checkDocLintErrors();
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkSingleIndex(true);
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test3() {
|
|
|
|
javadoc("-d", "out-3", "-noindex", "-Xdoclint:none",
|
|
|
|
"-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(false);
|
|
|
|
checkJqueryAndImageFiles(false);
|
|
|
|
checkFiles(false,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
|
|
|
"type-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js",
|
2015-11-29 02:52:17 +00:00
|
|
|
"index-all.html");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test4() {
|
|
|
|
javadoc("-d", "out-4", "-html5", "-Xdoclint:none",
|
|
|
|
"-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkSingleIndex(true);
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test5() {
|
|
|
|
javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none",
|
|
|
|
"-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(false);
|
|
|
|
checkJqueryAndImageFiles(false);
|
|
|
|
checkFiles(false,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
|
|
|
"type-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js",
|
2015-11-29 02:52:17 +00:00
|
|
|
"index-all.html");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test6() {
|
|
|
|
javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none",
|
|
|
|
"-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkIndexNoComment();
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test7() {
|
|
|
|
javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none",
|
|
|
|
"-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkIndexNoDeprecated();
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test8() {
|
|
|
|
javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
|
|
|
|
"-use", "pkg", "pkg1", "pkg2", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkInvalidUsageIndexTag();
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkSplitIndex();
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
|
|
|
"tag-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"tag-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void test9() {
|
|
|
|
javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package",
|
|
|
|
"-use", "pkgfx", "pkg3");
|
|
|
|
checkExit(Exit.OK);
|
|
|
|
checkSearchOutput(true);
|
|
|
|
checkJavaFXOutput();
|
|
|
|
checkJqueryAndImageFiles(true);
|
2016-10-13 17:48:09 +00:00
|
|
|
checkSearchJS();
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(false,
|
2017-01-26 21:01:12 +00:00
|
|
|
"tag-search-index.zip",
|
|
|
|
"tag-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkFiles(true,
|
|
|
|
"member-search-index.zip",
|
|
|
|
"package-search-index.zip",
|
2017-01-26 21:01:12 +00:00
|
|
|
"type-search-index.zip",
|
|
|
|
"member-search-index.js",
|
|
|
|
"package-search-index.js",
|
|
|
|
"type-search-index.js");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkDocLintErrors() {
|
|
|
|
checkOutput(Output.OUT, true,
|
|
|
|
"A sample method. Testing search tag for {@index \"unclosed quote}.",
|
|
|
|
"Another test class. Testing empty {@index }.",
|
|
|
|
"Constant field. Testing no text in index tag {@index}.",
|
|
|
|
"A test field. Testing only white-spaces in index tag text {@index }.");
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkSearchOutput(boolean expectedOutput) {
|
|
|
|
checkSearchOutput("overview-summary.html", expectedOutput);
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkSearchOutput(String fileName, boolean expectedOutput) {
|
|
|
|
// Test for search related markup
|
|
|
|
checkOutput(fileName, expectedOutput,
|
|
|
|
"<link rel=\"stylesheet\" type=\"text/css\" href=\"jquery/jquery-ui.css\" title=\"Style\">\n",
|
|
|
|
"<script type=\"text/javascript\" src=\"jquery/jszip/dist/jszip.min.js\"></script>\n",
|
|
|
|
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils.min.js\"></script>\n",
|
|
|
|
"<!--[if IE]>\n",
|
|
|
|
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n",
|
|
|
|
"<![endif]-->\n",
|
|
|
|
"<script type=\"text/javascript\" src=\"jquery/jquery-1.10.2.js\"></script>\n",
|
|
|
|
"<script type=\"text/javascript\" src=\"jquery/jquery-ui.js\"></script>",
|
|
|
|
"var pathtoroot = \"./\";loadScripts(document, 'script');",
|
|
|
|
"<ul class=\"navListSearch\">\n",
|
|
|
|
"<li><span>SEARCH: </span>\n",
|
|
|
|
"<input type=\"text\" id=\"search\" value=\" \" disabled=\"disabled\">\n",
|
|
|
|
"<input type=\"reset\" id=\"reset\" value=\" \" disabled=\"disabled\">\n");
|
|
|
|
checkOutput(fileName, true,
|
|
|
|
"<div class=\"fixedNav\">");
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkSingleIndex(boolean expectedOutput) {
|
|
|
|
// Test for search tags markup in index file.
|
|
|
|
checkOutput("index-all.html", expectedOutput,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "phrase with spaces</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg2.5</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "r</a></span> - Search tag in pkg</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SingleWord</a></span> - Search tag in pkg</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
|
|
|
|
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "#html-span-see-/span-\">html <span> see </span></a></span> - Search "
|
|
|
|
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>",
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#ONE\">ONE</a></span> - "
|
|
|
|
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>",
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#THREE\">THREE</a></span> - "
|
|
|
|
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>",
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#TWO\">TWO</a></span> - "
|
|
|
|
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkOutput("index-all.html", true,
|
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
|
2017-04-05 06:04:39 +00:00
|
|
|
+ " <a id=\"SearchTagDeprecatedClass\" class=\"searchTagResult\">SearchTagDeprecatedClass</a></span></div>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
|
2017-04-05 06:04:39 +00:00
|
|
|
+ " method <a id=\"SearchTagDeprecatedMethod\" class=\"searchTagResult\">SearchTagDeprecatedMethod</a></span></div>");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkSplitIndex() {
|
|
|
|
// Test for search tags markup in split index file.
|
2016-11-17 01:22:08 +00:00
|
|
|
checkOutput("index-files/index-13.html", true,
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SingleWord</a></span> - Search tag in pkg</dt>");
|
|
|
|
checkOutput("index-files/index-10.html", true,
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "phrase with spaces</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg2.5\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg2.5</a></span> - Search tag in pkg</dt>");
|
|
|
|
checkOutput("index-files/index-12.html", true,
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#r\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "r</a></span> - Search tag in pkg</dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkOutput("index-files/index-8.html", true,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
|
|
|
|
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkOutput("index-files/index-5.html", true,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "#html-span-see-/span-\">html <span> see </span></a></span> - Search "
|
|
|
|
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>");
|
|
|
|
checkOutput("index-files/index-11.html", true,
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>");
|
|
|
|
checkOutput("index-files/index-9.html", true,
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#ONE\">ONE</a>"
|
|
|
|
+ "</span> - pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>");
|
|
|
|
checkOutput("index-files/index-14.html", true,
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#THREE\">THREE</a></span> - "
|
|
|
|
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>",
|
|
|
|
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#TWO\">TWO</a></span> - "
|
|
|
|
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkIndexNoComment() {
|
|
|
|
// Test for search tags markup in index file when javadoc is executed with -nocomment.
|
|
|
|
checkOutput("index-all.html", false,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "phrase with spaces</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "pkg2.5</a></span> - Search tag in pkg</dt>",
|
2016-03-14 22:04:57 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "r</a></span> - Search tag in pkg</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SingleWord</a></span> - Search tag in pkg</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkOutput("index-all.html", true,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkIndexNoDeprecated() {
|
|
|
|
// Test for search tags markup in index file when javadoc is executed using -nodeprecated.
|
|
|
|
checkOutput("index-all.html", true,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "phrase with spaces</a></span> - Search tag in pkg</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SingleWord</a></span> - Search tag in pkg</dt>");
|
2015-11-29 02:52:17 +00:00
|
|
|
checkOutput("index-all.html", false,
|
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
|
2015-11-29 02:52:17 +00:00
|
|
|
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
|
2016-11-17 01:22:08 +00:00
|
|
|
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkJavaFXOutput() {
|
|
|
|
checkOutput("index-all.html", false, "test treat as private");
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkInvalidUsageIndexTag() {
|
|
|
|
checkOutput(Output.OUT, true,
|
|
|
|
"AnotherClass.java:29: warning - invalid usage of tag {@index",
|
|
|
|
"AnotherClass.java:41: warning - invalid usage of tag {@index",
|
|
|
|
"AnotherClass.java:36: warning - invalid usage of tag {@index",
|
|
|
|
"AnotherClass.java:70: warning - invalid usage of tag {@index");
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkJqueryAndImageFiles(boolean expectedOutput) {
|
|
|
|
checkFiles(expectedOutput,
|
|
|
|
"search.js",
|
|
|
|
"jquery/jquery-1.10.2.js",
|
|
|
|
"jquery/jquery-ui.js",
|
|
|
|
"jquery/jquery-ui.css",
|
|
|
|
"jquery/jquery-ui.min.js",
|
|
|
|
"jquery/jquery-ui.min.css",
|
|
|
|
"jquery/jquery-ui.structure.min.css",
|
|
|
|
"jquery/jquery-ui.structure.css",
|
|
|
|
"jquery/external/jquery/jquery.js",
|
|
|
|
"jquery/jszip/dist/jszip.js",
|
|
|
|
"jquery/jszip/dist/jszip.min.js",
|
|
|
|
"jquery/jszip-utils/dist/jszip-utils.js",
|
|
|
|
"jquery/jszip-utils/dist/jszip-utils.min.js",
|
|
|
|
"jquery/jszip-utils/dist/jszip-utils-ie.js",
|
|
|
|
"jquery/jszip-utils/dist/jszip-utils-ie.min.js",
|
|
|
|
"jquery/images/ui-bg_flat_0_aaaaaa_40x100.png",
|
|
|
|
"jquery/images/ui-icons_454545_256x240.png",
|
|
|
|
"jquery/images/ui-bg_glass_95_fef1ec_1x400.png",
|
|
|
|
"jquery/images/ui-bg_glass_75_dadada_1x400.png",
|
|
|
|
"jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
|
|
|
|
"jquery/images/ui-icons_888888_256x240.png",
|
|
|
|
"jquery/images/ui-icons_2e83ff_256x240.png",
|
|
|
|
"jquery/images/ui-bg_glass_65_ffffff_1x400.png",
|
|
|
|
"jquery/images/ui-icons_cd0a0a_256x240.png",
|
|
|
|
"jquery/images/ui-bg_glass_55_fbf9ee_1x400.png",
|
|
|
|
"jquery/images/ui-icons_222222_256x240.png",
|
|
|
|
"jquery/images/ui-bg_glass_75_e6e6e6_1x400.png",
|
|
|
|
"jquery/images/ui-bg_flat_75_ffffff_40x100.png",
|
|
|
|
"resources/x.png",
|
|
|
|
"resources/glass.png");
|
|
|
|
}
|
2016-10-13 17:48:09 +00:00
|
|
|
|
|
|
|
void checkSearchJS() {
|
|
|
|
checkOutput("search.js", true,
|
|
|
|
"camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join(\"([a-z0-9_$]*?)\");",
|
|
|
|
"var camelCaseMatcher = new RegExp(\"^\" + camelCaseRegexp);",
|
2017-02-09 16:01:19 +00:00
|
|
|
"camelCaseMatcher.test(item.l)",
|
|
|
|
"var secondaryresult = new Array();",
|
|
|
|
"function nestedName(e) {",
|
2017-03-15 21:18:28 +00:00
|
|
|
"function sortAndConcatResults(a1, a2) {",
|
|
|
|
"if (exactMatcher.test(item.l)) {\n"
|
|
|
|
+ " presult.unshift(item);");
|
2016-10-13 17:48:09 +00:00
|
|
|
}
|
2015-11-29 02:52:17 +00:00
|
|
|
}
|