1261N/A/*
1261N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
1261N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1261N/A *
1261N/A * This code is free software; you can redistribute it and/or modify it
1261N/A * under the terms of the GNU General Public License version 2 only, as
1261N/A * published by the Free Software Foundation.
1261N/A *
1261N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1261N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1261N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1261N/A * version 2 for more details (a copy is included in the LICENSE file that
1261N/A * accompanied this code).
1261N/A *
1261N/A * You should have received a copy of the GNU General Public License version
1261N/A * 2 along with this work; if not, write to the Free Software Foundation,
1261N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1261N/A *
1261N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1261N/A * or visit www.oracle.com if you need additional information or have any
1261N/A * questions.
1261N/A */
1261N/A
1261N/A/*
1261N/A * @test
1261N/A * @bug 7180906
1261N/A * @summary Test to make sure that the since tag works correctly
1261N/A * @author Bhavesh Patel
1261N/A * @library ../lib/
1261N/A * @build JavadocTester TestSinceTag
1261N/A * @run main TestSinceTag
1261N/A */
1261N/A
1261N/Apublic class TestSinceTag extends JavadocTester {
1261N/A
1261N/A //Test information.
1261N/A private static final String BUG_ID = "7180906";
1261N/A
1261N/A //Javadoc arguments.
1261N/A private static final String[] ARGS1 = new String[] {
1261N/A "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
1261N/A };
1261N/A
1261N/A private static final String[] ARGS2 = new String[] {
1261N/A "-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1"
1261N/A };
1261N/A
1261N/A //Input for string search tests.
1261N/A private static final String[][] TEST = {
1261N/A {BUG_ID + FS + "pkg1" + FS + "C1.html",
1261N/A "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
1261N/A " <dd>JDK1.0</dd>"
1261N/A },
1261N/A {BUG_ID + FS + "serialized-form.html",
1261N/A "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
1261N/A " <dd>1.4</dd>"
1261N/A }
1261N/A };
1261N/A
1261N/A /**
1261N/A * The entry point of the test.
1261N/A * @param args the array of command line arguments.
1261N/A */
1261N/A public static void main(String[] args) {
1261N/A TestSinceTag tester = new TestSinceTag();
1261N/A run(tester, ARGS1, TEST, NO_TEST);
1261N/A run(tester, ARGS2, NO_TEST, TEST);
1261N/A tester.printSummary();
1261N/A }
1261N/A
1261N/A /**
1261N/A * {@inheritDoc}
1261N/A */
1261N/A public String getBugId() {
1261N/A return BUG_ID;
1261N/A }
1261N/A
1261N/A /**
1261N/A * {@inheritDoc}
1261N/A */
1261N/A public String getBugName() {
1261N/A return getClass().getName();
1261N/A }
1261N/A}