VersionNumber.java revision 3233:b5d08bc0d224
181634Sbrian/*
281634Sbrian * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
381634Sbrian * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
481634Sbrian *
581634Sbrian * This code is free software; you can redistribute it and/or modify it
681634Sbrian * under the terms of the GNU General Public License version 2 only, as
781634Sbrian * published by the Free Software Foundation.
881634Sbrian *
981634Sbrian * This code is distributed in the hope that it will be useful, but WITHOUT
1081634Sbrian * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1181634Sbrian * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1281634Sbrian * version 2 for more details (a copy is included in the LICENSE file that
1381634Sbrian * accompanied this code).
1481634Sbrian *
1581634Sbrian * You should have received a copy of the GNU General Public License version
1681634Sbrian * 2 along with this work; if not, write to the Free Software Foundation,
1781634Sbrian * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1881634Sbrian *
1981634Sbrian * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2081634Sbrian * or visit www.oracle.com if you need additional information or have any
2181634Sbrian * questions.
2281634Sbrian */
2381634Sbrian
2481634Sbrian/*
2581634Sbrian * @test
2681634Sbrian * @bug 4720849
2781634Sbrian * @summary  Standard doclet contains hard-coded version number
2881634Sbrian * @author dkramer
2981634Sbrian * @library ../lib
3081634Sbrian * @modules jdk.javadoc
3196732Sbrian * @build JavadocTester
3296732Sbrian * @run main VersionNumber
3396732Sbrian */
3496732Sbrian
3581634Sbrian
3681634Sbrian/**
3781634Sbrian * Runs javadoc and runs regression tests on the resulting HTML.
3881634Sbrian */
3981634Sbrianpublic class VersionNumber extends JavadocTester {
4081634Sbrian
4181634Sbrian    public static void main(String... args) throws Exception {
4281634Sbrian        VersionNumber tester = new VersionNumber();
4381634Sbrian        tester.runTests();
4481634Sbrian    }
4581634Sbrian
4681634Sbrian    @Test
4781634Sbrian    void test() {
4881634Sbrian        javadoc("-d", "out",
4981634Sbrian                "p1");
5081634Sbrian        checkExit(Exit.OK);
5181634Sbrian
5281634Sbrian        // Test the proper DOCTYPE element is present:
5381634Sbrian        checkOutput("p1/C.html", true,
5481634Sbrian                "<!-- Generated by javadoc (");
5581634Sbrian    }
5681634Sbrian
5781634Sbrian}
5881634Sbrian