24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4625883 |
26 * @bug 4625883 |
27 * @summary Make sure that bad -link arguments trigger warnings. |
27 * @summary Make sure that bad -link arguments trigger warnings. |
28 * @author jamieh |
28 * @author jamieh |
29 * @library ../lib/ |
29 * @library ../lib |
30 * @build JavadocTester |
30 * @build JavadocTester |
31 * @build TestBadLinkOption |
|
32 * @run main TestBadLinkOption |
31 * @run main TestBadLinkOption |
33 */ |
32 */ |
34 |
33 |
35 public class TestBadLinkOption extends JavadocTester { |
34 public class TestBadLinkOption extends JavadocTester { |
36 |
35 |
37 private static final String[] ARGS = new String[] { |
36 public static void main(String... args) throws Exception { |
38 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, |
37 TestBadLinkOption tester = new TestBadLinkOption(); |
39 "-link", OUTPUT_DIR, "pkg" |
38 tester.runTests(); |
40 }; |
39 } |
41 |
40 |
42 private static final String[][] TEST = { |
41 @Test |
43 {WARNING_OUTPUT, "Error reading file:"} |
42 void test() { |
44 }; |
43 String out = "out"; |
|
44 javadoc("-d", out, |
|
45 "-sourcepath", testSrc, |
|
46 "-link", out, |
|
47 "pkg"); |
|
48 checkExit(Exit.OK); |
45 |
49 |
46 private static final String[][] NEG_TEST = { |
50 // TODO: the file it is trying to read, out/out/package-list, warrants investigation |
47 {ERROR_OUTPUT, "Error reading file:"} |
51 checkOutput(Output.WARNING, true, |
48 }; |
52 "Error reading file:"); |
49 |
53 |
50 /** |
54 checkOutput(Output.ERROR, false, |
51 * The entry point of the test. |
55 "Error reading file:"); |
52 * @param args the array of command line arguments. |
|
53 */ |
|
54 public static void main(String[] args) { |
|
55 TestBadLinkOption tester = new TestBadLinkOption(); |
|
56 tester.run(ARGS, TEST, NEG_TEST); |
|
57 tester.printSummary(); |
|
58 } |
56 } |
59 } |
57 } |