TestLegacyTaglet.java revision 4041:e9e81bd49607
1160814Ssimon/* 2160814Ssimon * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. 3160814Ssimon * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4160814Ssimon * 5160814Ssimon * This code is free software; you can redistribute it and/or modify it 6160814Ssimon * under the terms of the GNU General Public License version 2 only, as 7160814Ssimon * published by the Free Software Foundation. 8160814Ssimon * 9160814Ssimon * This code is distributed in the hope that it will be useful, but WITHOUT 10160814Ssimon * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11160814Ssimon * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12160814Ssimon * version 2 for more details (a copy is included in the LICENSE file that 13160814Ssimon * accompanied this code). 14160814Ssimon * 15160814Ssimon * You should have received a copy of the GNU General Public License version 16160814Ssimon * 2 along with this work; if not, write to the Free Software Foundation, 17160814Ssimon * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18160814Ssimon * 19160814Ssimon * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20160814Ssimon * or visit www.oracle.com if you need additional information or have any 21160814Ssimon * questions. 22160814Ssimon */ 23160814Ssimon 24160814Ssimon/* 25160814Ssimon * @test 26160814Ssimon * @bug 4638723 8015882 8176131 8176331 27160814Ssimon * @summary Test to ensure that the refactored version of the standard 28160814Ssimon * doclet still works with Taglets that implement the 1.4.0 interface. 29160814Ssimon * @author jamieh 30160814Ssimon * @library ../lib 31160814Ssimon * @modules jdk.javadoc/jdk.javadoc.internal.tool 32160814Ssimon * @build JavadocTester ToDoTaglet UnderlineTaglet Check 33160814Ssimon * @run main TestLegacyTaglet 34160814Ssimon */ 35160814Ssimon 36160814Ssimonpublic class TestLegacyTaglet extends JavadocTester { 37160814Ssimon 38160814Ssimon public static void main(String... args) throws Exception { 39160814Ssimon TestLegacyTaglet tester = new TestLegacyTaglet(); 40160814Ssimon tester.runTests(); 41160814Ssimon } 42160814Ssimon 43160814Ssimon @Test 44160814Ssimon void test() { 45160814Ssimon javadoc("-d", "out", 46160814Ssimon "-sourcepath", testSrc, 47160814Ssimon "-tagletpath", System.getProperty("test.classes", "."), 48160814Ssimon "-taglet", "ToDoTaglet", 49160814Ssimon "-taglet", "Check", 50160814Ssimon "-taglet", "UnderlineTaglet", 51160814Ssimon testSrc("C.java")); 52160814Ssimon checkExit(Exit.OK); 53160814Ssimon checkOutput("C.html", true, 54160814Ssimon "This is an <u>underline</u>", 55160814Ssimon "<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" + 56160814Ssimon "<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>", 57160814Ssimon "<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" + 58160814Ssimon "<td bgcolor=\"yellow\">Tag in Method.</td></tr></table></DD>"); 59160814Ssimon checkOutput(Output.STDERR, false, 60160814Ssimon "NullPointerException"); 61160814Ssimon } 62160814Ssimon} 63160814Ssimon