author | ssides |
Wed, 09 Jul 2014 15:14:06 +0400 | |
changeset 25760 | 7955db32d6b0 |
parent 24603 | 43e7e44d63da |
child 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
10 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5520 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
24603
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
26 |
* @bug 6227616 8043186 |
10 | 27 |
* @summary Test the new -top option. |
28 |
* @author jamieh |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
29 |
* @library ../lib |
10 | 30 |
* @build JavadocTester |
31 |
* @run main TestTopOption |
|
32 |
*/ |
|
33 |
||
34 |
public class TestTopOption extends JavadocTester { |
|
35 |
||
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
36 |
public static void main(String... args) throws Exception { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
37 |
TestTopOption tester = new TestTopOption(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
38 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
39 |
} |
10 | 40 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
41 |
@Test |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
void test() { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
javadoc("-overview", testSrc("overview.html"), |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
44 |
"-use", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
"-top", "TOP TEXT", |
24603
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
46 |
"-d", "out-1", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
47 |
"-sourcepath", testSrc, |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
48 |
"pkg"); |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
49 |
checkExit(Exit.OK); |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
50 |
|
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
51 |
checkTopText( |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
52 |
"pkg/AnnotationType.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
53 |
"pkg/class-use/AnnotationType.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
54 |
"pkg/Cl.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
55 |
"pkg/class-use/Cl.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
56 |
"pkg/package-summary.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
57 |
"pkg/package-use.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
58 |
"overview-summary.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
59 |
"overview-tree.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
60 |
"constant-values.html", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
61 |
"help-doc.html"); |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
62 |
} |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
63 |
|
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
64 |
@Test |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
65 |
void testDocRootRewrite() { |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
66 |
javadoc("-overview", testSrc("overview.html"), |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
67 |
"-use", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
68 |
"-top", "\u0130{@docroot}TOP TEXT", |
43e7e44d63da
8043186: javac test langtools/tools/javac/util/StringUtilsTest.java fails
jlahoda
parents:
24399
diff
changeset
|
69 |
"-d", "out-2", |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
70 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
71 |
"pkg"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
72 |
checkExit(Exit.OK); |
10 | 73 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
74 |
checkTopText( |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
75 |
"pkg/AnnotationType.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
76 |
"pkg/class-use/AnnotationType.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
77 |
"pkg/Cl.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
78 |
"pkg/class-use/Cl.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
79 |
"pkg/package-summary.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
80 |
"pkg/package-use.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
81 |
"overview-summary.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
82 |
"overview-tree.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
83 |
"constant-values.html", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
84 |
"help-doc.html"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
85 |
} |
10 | 86 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
87 |
void checkTopText(String... files) { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
88 |
for (String file : files) { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
89 |
checkOutput(file, true, "TOP TEXT"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
90 |
} |
10 | 91 |
} |
92 |
} |