langtools/test/com/sun/javadoc/testPackagePage/TestPackagePage.java
changeset 23971 f5ff1f5a8dee
parent 14357 faf9cde2817b
child 24065 fc4022e50129
equal deleted inserted replaced
23970:76f4acb11952 23971:f5ff1f5a8dee
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2014, 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.
    36 
    36 
    37 public class TestPackagePage extends JavadocTester {
    37 public class TestPackagePage extends JavadocTester {
    38 
    38 
    39     private static final String BUG_ID = "4492643-4689286";
    39     private static final String BUG_ID = "4492643-4689286";
    40     private static final String[][] TEST1 = {
    40     private static final String[][] TEST1 = {
    41         {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "package-summary.html",
    41         {BUG_ID + "-1/com/pkg/package-summary.html",
    42             "This is a package page."
    42             "This is a package page."
    43         },
    43         },
    44         //With just one package, all general pages link to the single package page.
    44         //With just one package, all general pages link to the single package page.
    45         {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "C.html",
    45         {BUG_ID + "-1/com/pkg/C.html",
    46             "<a href=\"../../com/pkg/package-summary.html\">Package</a>"
    46             "<a href=\"../../com/pkg/package-summary.html\">Package</a>"
    47         },
    47         },
    48         {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "package-tree.html",
    48         {BUG_ID + "-1/com/pkg/package-tree.html",
    49             "<li><a href=\"../../com/pkg/package-summary.html\">Package</a></li>"
    49             "<li><a href=\"../../com/pkg/package-summary.html\">Package</a></li>"
    50         },
    50         },
    51         {BUG_ID + "-1" + FS + "deprecated-list.html",
    51         {BUG_ID + "-1/deprecated-list.html",
    52             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    52             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    53         },
    53         },
    54         {BUG_ID + "-1" + FS + "index-all.html",
    54         {BUG_ID + "-1/index-all.html",
    55             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    55             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    56         },
    56         },
    57         {BUG_ID + "-1" + FS + "help-doc.html",
    57         {BUG_ID + "-1/help-doc.html",
    58             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    58             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>"
    59         },
    59         },
    60     };
    60     };
    61 
    61 
    62     private static final String[][] TEST2 = {
    62     private static final String[][] TEST2 = {
    63         //With multiple packages, there is no package link in general pages.
    63         //With multiple packages, there is no package link in general pages.
    64         {BUG_ID + "-2" + FS + "deprecated-list.html",
    64         {BUG_ID + "-2/deprecated-list.html",
    65             "<li>Package</li>"
    65             "<li>Package</li>"
    66         },
    66         },
    67         {BUG_ID + "-2" + FS + "index-all.html",
    67         {BUG_ID + "-2/index-all.html",
    68             "<li>Package</li>"
    68             "<li>Package</li>"
    69         },
    69         },
    70         {BUG_ID + "-2" + FS + "help-doc.html",
    70         {BUG_ID + "-2/help-doc.html",
    71             "<li>Package</li>"
    71             "<li>Package</li>"
    72         },
    72         },
    73     };
    73     };
    74 
    74 
    75     private static final String[] ARGS1 =
    75     private static final String[] ARGS1 =
    76         new String[] {
    76         new String[] {
    77             "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR,
    77             "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR,
    78             SRC_DIR + FS + "com" + FS + "pkg" + FS + "C.java"
    78             SRC_DIR + "/com/pkg/C.java"
    79         };
    79         };
    80 
    80 
    81     private static final String[] ARGS2 =
    81     private static final String[] ARGS2 =
    82         new String[] {
    82         new String[] {
    83             "-d", BUG_ID + "-2", "-sourcepath", SRC_DIR,
    83             "-d", BUG_ID + "-2", "-sourcepath", SRC_DIR,