TestSimpleTag.java revision 3233:b5d08bc0d224
12432Sse/*
22432Sse * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
32432Sse * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
439247Sgibbs *
52432Sse * This code is free software; you can redistribute it and/or modify it
62432Sse * under the terms of the GNU General Public License version 2 only, as
72432Sse * published by the Free Software Foundation.
82432Sse *
97228Sse * This code is distributed in the hope that it will be useful, but WITHOUT
103533Sse * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
112432Sse * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
122432Sse * version 2 for more details (a copy is included in the LICENSE file that
13139834Sscottl * accompanied this code).
14139825Simp *
152432Sse * You should have received a copy of the GNU General Public License version
162432Sse * 2 along with this work; if not, write to the Free Software Foundation,
172432Sse * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
182432Sse *
192432Sse * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202432Sse * or visit www.oracle.com if you need additional information or have any
212432Sse * questions.
222432Sse */
232432Sse
242432Sse/*
252432Sse * @test
262432Sse * @bug 4695326 4750173 4920381 8078320
272432Sse * @summary Test the declaration of simple tags using -tag. Verify that
282432Sse * "-tag name" is a shortcut for "-tag name:a:Name:".  Also verity that
292432Sse * you can escape the ":" character with a back slash so that it is not
302432Sse * considered a separator when parsing the simple tag argument.
312432Sse * @author jamieh
322432Sse * @library ../lib
332432Sse * @modules jdk.javadoc
342432Sse * @build JavadocTester
352432Sse * @run main TestSimpleTag
362432Sse */
372432Sse
382432Ssepublic class TestSimpleTag extends JavadocTester {
393533Sse
402432Sse    public static void main(String... args) throws Exception {
412432Sse        TestSimpleTag tester = new TestSimpleTag();
42116192Sobrien        tester.runTests();
43116192Sobrien    }
44116192Sobrien
45116192Sobrien    @Test
469429Sse    void test() {
477228Sse        javadoc("-d", "out",
4855206Speter                "-sourcepath", testSrc,
4920535Sse                "-tag", "todo",
5055206Speter                "-tag", "ejb\\:bean:a:EJB Beans:",
5120517Sse                "-tag", "regular:a:Regular Tag:",
522432Sse                "-tag", "tag-with-hyphens:a:Tag-With-Hyphens:",
532432Sse                testSrc("C.java"));
542432Sse        checkExit(Exit.OK);
552432Sse
566460Sse        checkOutput("C.html", true,
572432Sse                "<span class=\"simpleTagLabel\">Todo:</span>",
582432Sse                "<span class=\"simpleTagLabel\">EJB Beans:</span>",
592432Sse                "<span class=\"simpleTagLabel\">Regular Tag:</span>",
602432Sse                "<span class=\"simpleTagLabel\">Tag-With-Hyphens:</span>");
612432Sse    }
622432Sse}
632432Sse