author | jjg |
Fri, 25 Apr 2014 13:08:41 -0700 | |
changeset 24217 | 25b12d4d4192 |
parent 24072 | e7549dcbc4af |
child 24399 | af1a0220d0fa |
permissions | -rw-r--r-- |
13842 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
13842 | 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 |
* |
|
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. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
17567
diff
changeset
|
26 |
* @bug 7180906 8026567 |
13842 | 27 |
* @summary Test to make sure that the since tag works correctly |
28 |
* @author Bhavesh Patel |
|
29 |
* @library ../lib/ |
|
30 |
* @build JavadocTester TestSinceTag |
|
31 |
* @run main TestSinceTag |
|
32 |
*/ |
|
33 |
||
34 |
public class TestSinceTag extends JavadocTester { |
|
35 |
||
36 |
//Javadoc arguments. |
|
37 |
private static final String[] ARGS1 = new String[] { |
|
24217
25b12d4d4192
8040904: Ensure javadoc tests do not overwrite results within tests
jjg
parents:
24072
diff
changeset
|
38 |
"-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1" |
13842 | 39 |
}; |
40 |
||
41 |
private static final String[] ARGS2 = new String[] { |
|
24217
25b12d4d4192
8040904: Ensure javadoc tests do not overwrite results within tests
jjg
parents:
24072
diff
changeset
|
42 |
"-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "-nosince", "pkg1" |
13842 | 43 |
}; |
44 |
||
45 |
//Input for string search tests. |
|
46 |
private static final String[][] TEST = { |
|
24072 | 47 |
{ "pkg1/C1.html", |
23971 | 48 |
"<dl>\n" + |
49 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
17566
7e1a338e1085
8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents:
13842
diff
changeset
|
50 |
"<dd>JDK1.0</dd>" |
13842 | 51 |
}, |
24072 | 52 |
{ "serialized-form.html", |
23971 | 53 |
"<dl>\n" + |
54 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
17566
7e1a338e1085
8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents:
13842
diff
changeset
|
55 |
"<dd>1.4</dd>" |
13842 | 56 |
} |
57 |
}; |
|
58 |
||
59 |
/** |
|
60 |
* The entry point of the test. |
|
61 |
* @param args the array of command line arguments. |
|
62 |
*/ |
|
63 |
public static void main(String[] args) { |
|
64 |
TestSinceTag tester = new TestSinceTag(); |
|
24065
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
65 |
tester.run(ARGS1, TEST, NO_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
66 |
tester.run(ARGS2, NO_TEST, TEST); |
13842 | 67 |
tester.printSummary(); |
68 |
} |
|
69 |
} |