32 */ 33 34 import javadoc.tester.JavadocTester; 35 36 public class TestLiteralCodeInPre extends JavadocTester { 37 38 public static void main(String... args) throws Exception { 39 TestLiteralCodeInPre tester = new TestLiteralCodeInPre(); 40 tester.runTests(); 41 } 42 43 @Test 44 public void test() { 45 javadoc("-d", "out", 46 "-sourcepath", testSrc, 47 "-Xdoclint:none", 48 "pkg"); 49 checkExit(Exit.OK); 50 51 checkOutput("pkg/Test.html", true, 52 "no_pre()</pre>\n" 53 + "<div class=\"block\">abc<code>def</code>ghi</div>", 54 "no_pre_extra_whitespace()</pre>\n" 55 + "<div class=\"block\">abc<code> def </code>ghi</div>", 56 "in_pre()</pre>\n" 57 + "<div class=\"block\"><pre> abc<code> def </code>ghi</pre></div>", 58 "pre_after_text()</pre>\n" 59 + "<div class=\"block\">xyz <pre> abc<code> def </code>ghi</pre></div>", 60 "after_pre()</pre>\n" 61 + "<div class=\"block\">xyz <pre> pqr </pre> abc<code> def </code>ghi</div>", 62 "back_in_pre()</pre>\n" 63 + "<div class=\"block\">xyz <pre> pqr </pre> mno <pre> abc<code> def </code>ghi</pre></div>", 64 "typical_usage_code()</pre>\n" 65 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 66 + " Example: <pre><code>\n" 67 + " line 0 @Override\n" 68 + " line 1 <T> void m(T t) {\n" 69 + " line 2 // do something with T\n" 70 + " line 3 }\n" 71 + " </code></pre>\n" 72 + " and so it goes.</div>", 73 "typical_usage_literal()</pre>\n" 74 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 75 + " Example: <pre>\n" 76 + " line 0 @Override\n" 77 + " line 1 <T> void m(T t) {\n" 78 + " line 2 // do something with T\n" 79 + " line 3 }\n" 80 + " </pre>\n" 81 + " and so it goes.</div>", 82 "recommended_usage_literal()</pre>\n" 83 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 84 + " Example: <pre>\n" 85 + " line 0 @Override\n" 86 + " line 1 <T> void m(T t) {\n" 87 + " line 2 // do something with T\n" 88 + " line 3 } </pre>\n" 89 + " and so it goes.</div>", 90 "<div class=\"block\">Test for html in pre, note the spaces\n" 91 + " <PRE>\n" 92 + " <b>id </b>\n" 93 + " </PRE></div>", 94 "<pre class=\"methodSignature\">public void htmlAttrInPre1()</pre>\n" 95 + "<div class=\"block\">More html tag outliers.\n" 96 + " <pre>\n" 97 + " @Override\n" 98 + " <code> some.function() </code>\n" 99 + " </pre></div>"); 100 } 101 } | 32 */ 33 34 import javadoc.tester.JavadocTester; 35 36 public class TestLiteralCodeInPre extends JavadocTester { 37 38 public static void main(String... args) throws Exception { 39 TestLiteralCodeInPre tester = new TestLiteralCodeInPre(); 40 tester.runTests(); 41 } 42 43 @Test 44 public void test() { 45 javadoc("-d", "out", 46 "-sourcepath", testSrc, 47 "-Xdoclint:none", 48 "pkg"); 49 checkExit(Exit.OK); 50 51 checkOutput("pkg/Test.html", true, 52 "no_pre</span>()</div>\n" 53 + "<div class=\"block\">abc<code>def</code>ghi</div>", 54 "no_pre_extra_whitespace</span>()</div>\n" 55 + "<div class=\"block\">abc<code> def </code>ghi</div>", 56 "in_pre</span>()</div>\n" 57 + "<div class=\"block\"><pre> abc<code> def </code>ghi</pre></div>", 58 "pre_after_text</span>()</div>\n" 59 + "<div class=\"block\">xyz <pre> abc<code> def </code>ghi</pre></div>", 60 "after_pre</span>()</div>\n" 61 + "<div class=\"block\">xyz <pre> pqr </pre> abc<code> def </code>ghi</div>", 62 "back_in_pre</span>()</div>\n" 63 + "<div class=\"block\">xyz <pre> pqr </pre> mno <pre> abc<code> def </code>ghi</pre></div>", 64 "typical_usage_code</span>()</div>\n" 65 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 66 + " Example: <pre><code>\n" 67 + " line 0 @Override\n" 68 + " line 1 <T> void m(T t) {\n" 69 + " line 2 // do something with T\n" 70 + " line 3 }\n" 71 + " </code></pre>\n" 72 + " and so it goes.</div>", 73 "typical_usage_literal</span>()</div>\n" 74 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 75 + " Example: <pre>\n" 76 + " line 0 @Override\n" 77 + " line 1 <T> void m(T t) {\n" 78 + " line 2 // do something with T\n" 79 + " line 3 }\n" 80 + " </pre>\n" 81 + " and so it goes.</div>", 82 "recommended_usage_literal</span>()</div>\n" 83 + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" 84 + " Example: <pre>\n" 85 + " line 0 @Override\n" 86 + " line 1 <T> void m(T t) {\n" 87 + " line 2 // do something with T\n" 88 + " line 3 } </pre>\n" 89 + " and so it goes.</div>", 90 "<div class=\"block\">Test for html in pre, note the spaces\n" 91 + " <PRE>\n" 92 + " <b>id </b>\n" 93 + " </PRE></div>", 94 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span> " 95 + "<span class=\"returnType\">void</span> <span class=\"memberName\">htmlAttrInPre1</span>()</div>\n" 96 + "<div class=\"block\">More html tag outliers.\n" 97 + " <pre>\n" 98 + " @Override\n" 99 + " <code> some.function() </code>\n" 100 + " </pre></div>"); 101 } 102 } |