test/langtools/jdk/javadoc/doclet/testGroupName/TestGroupName.java
changeset 50167 cc705c956798
parent 47847 7640bc1eb94f
child 50293 edfb87b2520e
equal deleted inserted replaced
50166:1d683e243d8d 50167:cc705c956798
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8190003
    26  * @bug 8190003 8196201
    27  * @summary Special characters in group names should be escaped
    27  * @summary Special characters in group names should be escaped
    28  * @library /tools/lib ../lib
    28  * @library /tools/lib ../lib
    29  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    29  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    30  * @build toolbox.ToolBox JavadocTester
    30  * @build toolbox.ToolBox JavadocTester
    31  * @run main TestGroupName
    31  * @run main TestGroupName
    62                 "-group", "abc < & > def", "p1",
    62                 "-group", "abc < & > def", "p1",
    63                 "p1", "p2", "p3");
    63                 "p1", "p2", "p3");
    64         checkExit(Exit.OK);
    64         checkExit(Exit.OK);
    65 
    65 
    66         checkOutput("overview-summary.html", true,
    66         checkOutput("overview-summary.html", true,
    67                 "<span><a href=\"javascript:showGroups(1);\">abc &lt; &amp; &gt; def</a></span>",
    67                 "<span><a href=\"javascript:show(1);\">abc &lt; &amp; &gt; def</a></span>",
    68                 ",\"abc < & > def\"],");
    68                 ",\"abc < & > def\"],");
    69     }
    69     }
    70 
    70 
    71     @Test
    71     @Test
    72     public void testModuleGroups(Path base) throws IOException {
    72     public void testModuleGroups(Path base) throws IOException {
    95                 "--module", "ma,mb,mc");
    95                 "--module", "ma,mb,mc");
    96 
    96 
    97         checkExit(Exit.OK);
    97         checkExit(Exit.OK);
    98 
    98 
    99         checkOutput("overview-summary.html", true,
    99         checkOutput("overview-summary.html", true,
   100                 "<span><a href=\"javascript:showGroups(1);\">abc &lt; &amp; &gt; def</a></span>",
   100                 "<span><a href=\"javascript:show(1);\">abc &lt; &amp; &gt; def</a></span>",
   101                 ",\"abc < & > def\"],");
   101                 ",\"abc < & > def\"],");
   102     }
   102     }
   103 }
   103 }
   104 
   104