test/com/sun/javadoc/testUseOption/TestUseOption.java

changeset 1350
ef88ae455c88
parent 927
b60754fe206d
child 2055
184c0d6698c3
equal deleted inserted replaced
1349:d604fd09480b 1350:ef88ae455c88
1 /* 1 /*
2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 4496290 4985072 7006178 26 * @bug 4496290 4985072 7006178 7068595
27 * @summary A simple test to determine if -use works. 27 * @summary A simple test to determine if -use works.
28 * @author jamieh 28 * @author jamieh
29 * @library ../lib/ 29 * @library ../lib/
30 * @build JavadocTester 30 * @build JavadocTester
31 * @build TestUseOption 31 * @build TestUseOption
32 * @run main TestUseOption 32 * @run main TestUseOption
33 */ 33 */
34 34
35 public class TestUseOption extends JavadocTester { 35 public class TestUseOption extends JavadocTester {
36 36
37 private static final String BUG_ID = "4496290-4985072-7006178"; 37 private static final String BUG_ID = "4496290-4985072-7006178-7068595";
38 38
39 //Input for string search tests. 39 //Input for string search tests.
40 private static final String[] TEST2 = { 40 private static final String[] TEST2 = {
41 "Field in C1.", 41 "Field in C1.",
42 "Field in C2.", 42 "Field in C2.",
62 {BUG_ID + "-3" + FS + "package-use.html", "<td class=\"colOne\">" + 62 {BUG_ID + "-3" + FS + "package-use.html", "<td class=\"colOne\">" +
63 "<a href=\"class-use/UsedInC.html#&lt;Unnamed&gt;\">UsedInC</a>&nbsp;</td>" 63 "<a href=\"class-use/UsedInC.html#&lt;Unnamed&gt;\">UsedInC</a>&nbsp;</td>"
64 } 64 }
65 }; 65 };
66 66
67 private static final String[][] TEST4 = {
68 {BUG_ID + "-4" + FS + "pkg2" + FS + "class-use" + FS + "C3.html", "<a href=" +
69 "\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">" +
70 "Frames</a></li>"
71 }
72 };
73
67 private static final String[] ARGS = new String[] { 74 private static final String[] ARGS = new String[] {
68 "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" 75 "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
69 }; 76 };
70 77
71 private static final String[] ARGS2 = new String[] { 78 private static final String[] ARGS2 = new String[] {
72 "-d", BUG_ID+"-2", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" 79 "-d", BUG_ID+"-2", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
73 }; 80 };
74 81
75 private static final String[] ARGS3 = new String[] { 82 private static final String[] ARGS3 = new String[] {
76 "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java" 83 "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java"
84 };
85
86 private static final String[] ARGS4 = new String[] {
87 "-d", BUG_ID + "-4", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
77 }; 88 };
78 89
79 /** 90 /**
80 * The entry point of the test. 91 * The entry point of the test.
81 * @param args the array of command line arguments. 92 * @param args the array of command line arguments.
106 throw new Exception(TEST2[i] + " is in the wrong order."); 117 throw new Exception(TEST2[i] + " is in the wrong order.");
107 prevIndex = currentIndex; 118 prevIndex = currentIndex;
108 } 119 }
109 tester.printSummary(); 120 tester.printSummary();
110 run(tester, ARGS3, TEST3, NO_TEST); 121 run(tester, ARGS3, TEST3, NO_TEST);
122 run(tester, ARGS4, TEST4, NO_TEST);
111 tester.printSummary(); 123 tester.printSummary();
112 } 124 }
113 125
114 /** 126 /**
115 * {@inheritDoc} 127 * {@inheritDoc}

mercurial