25 * @test |
25 * @test |
26 * @bug 4764045 8004825 8026567 8191030 8204330 |
26 * @bug 4764045 8004825 8026567 8191030 8204330 |
27 * @summary This test ensures that the value tag works in all |
27 * @summary This test ensures that the value tag works in all |
28 * use cases, the tests are explained below. |
28 * use cases, the tests are explained below. |
29 * @author jamieh |
29 * @author jamieh |
30 * @library ../lib |
30 * @library ../../lib |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
32 * @build JavadocTester |
32 * @build javadoc.tester.* |
33 * @run main TestValueTag |
33 * @run main TestValueTag |
34 */ |
34 */ |
35 |
35 |
36 import java.io.IOException; |
36 import java.io.IOException; |
37 import java.nio.file.Files; |
37 import java.nio.file.Files; |
38 import java.nio.file.Path; |
38 import java.nio.file.Path; |
39 import java.nio.file.Paths; |
39 import java.nio.file.Paths; |
40 import java.util.List; |
40 import java.util.List; |
41 |
41 |
|
42 import javadoc.tester.JavadocTester; |
|
43 |
42 public class TestValueTag extends JavadocTester { |
44 public class TestValueTag extends JavadocTester { |
43 |
45 |
44 public static void main(String... args) throws Exception { |
46 public static void main(String... args) throws Exception { |
45 TestValueTag tester = new TestValueTag(); |
47 TestValueTag tester = new TestValueTag(); |
46 tester.runTests(); |
48 tester.runTests(); |
47 } |
49 } |
48 |
50 |
49 @Test |
51 @Test |
50 void test1() { |
52 public void test1() { |
51 javadoc("-d", "out1", |
53 javadoc("-d", "out1", |
52 "-sourcepath", testSrc, |
54 "-sourcepath", testSrc, |
53 "-tag", "todo", |
55 "-tag", "todo", |
54 "pkg1", "pkg2"); |
56 "pkg1", "pkg2"); |
55 checkExit(Exit.ERROR); |
57 checkExit(Exit.ERROR); |
154 + "\"Test 12 passes\"</a>."); |
156 + "\"Test 12 passes\"</a>."); |
155 checkForException(); |
157 checkForException(); |
156 } |
158 } |
157 |
159 |
158 @Test |
160 @Test |
159 void test4() throws IOException { |
161 public void test4() throws IOException { |
160 Path base = Paths.get("test4"); |
162 Path base = Paths.get("test4"); |
161 Path src = base.resolve("src"); |
163 Path src = base.resolve("src"); |
162 Files.createDirectories(src.resolve("p")); |
164 Files.createDirectories(src.resolve("p")); |
163 Files.write(src.resolve("p").resolve("C.java"), List.of( |
165 Files.write(src.resolve("p").resolve("C.java"), List.of( |
164 "package p;", |
166 "package p;", |