1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/doclint/AnchorTest.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,93 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8004832 1.7 + * @summary Add new doclint package 1.8 + * @build DocLintTester 1.9 + * @run main DocLintTester -ref AnchorTest.out AnchorTest.java 1.10 + */ 1.11 + 1.12 +/** */ 1.13 +public class AnchorTest { 1.14 + // tests for <a name=value> 1.15 + 1.16 + /** 1.17 + * <a name=foo></a> 1.18 + */ 1.19 + public void a_name_foo() { } 1.20 + 1.21 + /** 1.22 + * <a name=foo></a> 1.23 + */ 1.24 + public void a_name_already_defined() { } 1.25 + 1.26 + /** 1.27 + * <a name=></a> 1.28 + */ 1.29 + public void a_name_empty() { } 1.30 + 1.31 + /** 1.32 + * <a name=123 ></a> 1.33 + */ 1.34 + public void a_name_invalid() { } 1.35 + 1.36 + /** 1.37 + * <a name ></a> 1.38 + */ 1.39 + public void a_name_missing() { } 1.40 + 1.41 + // tests for <a id=value> 1.42 + 1.43 + /** 1.44 + * <a id=a_id_foo></a> 1.45 + */ 1.46 + public void a_id_foo() { } 1.47 + 1.48 + /** 1.49 + * <a id=foo></a> 1.50 + */ 1.51 + public void a_id_already_defined() { } 1.52 + 1.53 + /** 1.54 + * <a id=></a> 1.55 + */ 1.56 + public void a_id_empty() { } 1.57 + 1.58 + /** 1.59 + * <a id=123 ></a> 1.60 + */ 1.61 + public void a_id_invalid() { } 1.62 + 1.63 + /** 1.64 + * <a id ></a> 1.65 + */ 1.66 + public void a_id_missing() { } 1.67 + 1.68 + // tests for id=value on non-<a> tags 1.69 + 1.70 + /** 1.71 + * <p id=p_id_foo>text</p> 1.72 + */ 1.73 + public void p_id_foo() { } 1.74 + 1.75 + /** 1.76 + * <p id=foo>text</p> 1.77 + */ 1.78 + public void p_id_already_defined() { } 1.79 + 1.80 + /** 1.81 + * <p id=>text</p> 1.82 + */ 1.83 + public void p_id_empty() { } 1.84 + 1.85 + /** 1.86 + * <p id=123 >text</p> 1.87 + */ 1.88 + public void p_id_invalid() { } 1.89 + 1.90 + /** 1.91 + * <p id >text</p> 1.92 + */ 1.93 + public void p_id_missing() { } 1.94 + 1.95 + 1.96 +}