bpatel@943: /* bpatel@943: * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. bpatel@943: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. bpatel@943: * bpatel@943: * This code is free software; you can redistribute it and/or modify it bpatel@943: * under the terms of the GNU General Public License version 2 only, as bpatel@943: * published by the Free Software Foundation. bpatel@943: * bpatel@943: * This code is distributed in the hope that it will be useful, but WITHOUT bpatel@943: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or bpatel@943: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License bpatel@943: * version 2 for more details (a copy is included in the LICENSE file that bpatel@943: * accompanied this code). bpatel@943: * bpatel@943: * You should have received a copy of the GNU General Public License version bpatel@943: * 2 along with this work; if not, write to the Free Software Foundation, bpatel@943: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. bpatel@943: * bpatel@943: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA bpatel@943: * or visit www.oracle.com if you need additional information or have any bpatel@943: * questions. bpatel@943: */ bpatel@943: bpatel@943: /* bpatel@943: * @test bpatel@943: * @bug 7010342 bpatel@943: * @summary Test for correct sub title generation. bpatel@943: * @author Bhavesh Patel bpatel@943: * @library ../lib/ bpatel@943: * @build JavadocTester bpatel@943: * @build TestSubTitle bpatel@943: * @run main TestSubTitle bpatel@943: */ bpatel@943: bpatel@943: public class TestSubTitle extends JavadocTester { bpatel@943: bpatel@943: private static final String BUG_ID = "7010342"; bpatel@943: private static final String[][] TEST = { bpatel@943: {BUG_ID + FS + "pkg" + FS + "package-summary.html", bpatel@995: "
This is the description of package pkg.
" bpatel@943: }, bpatel@943: {BUG_ID + FS + "pkg" + FS + "C.html", bpatel@943: "
pkg
" bpatel@943: } bpatel@943: }; bpatel@943: private static final String[][] NEG_TEST = { bpatel@943: {BUG_ID + FS + "pkg" + FS + "package-summary.html", bpatel@943: "

" + NL + "

This is the " + bpatel@943: "description of package pkg.
" + NL + "

" bpatel@943: }, bpatel@943: {BUG_ID + FS + "pkg" + FS + "C.html", bpatel@943: "

pkg

" bpatel@943: } bpatel@943: }; bpatel@943: private static final String[] ARGS = new String[]{ bpatel@943: "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" bpatel@943: }; bpatel@943: bpatel@943: /** bpatel@943: * The entry point of the test. bpatel@943: * @param args the array of command line arguments. bpatel@943: */ bpatel@943: public static void main(String[] args) { bpatel@943: TestSubTitle tester = new TestSubTitle(); bpatel@943: run(tester, ARGS, TEST, NEG_TEST); bpatel@943: tester.printSummary(); bpatel@943: } bpatel@943: bpatel@943: /** bpatel@943: * {@inheritDoc} bpatel@943: */ bpatel@943: public String getBugId() { bpatel@943: return BUG_ID; bpatel@943: } bpatel@943: bpatel@943: /** bpatel@943: * {@inheritDoc} bpatel@943: */ bpatel@943: public String getBugName() { bpatel@943: return getClass().getName(); bpatel@943: } bpatel@943: }