TestOptions.java revision 3294:9adfb22ff08f
1221828Sgrehan/* 2221828Sgrehan * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. 3221828Sgrehan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4221828Sgrehan * 5221828Sgrehan * This code is free software; you can redistribute it and/or modify it 6221828Sgrehan * under the terms of the GNU General Public License version 2 only, as 7221828Sgrehan * published by the Free Software Foundation. 8221828Sgrehan * 9221828Sgrehan * This code is distributed in the hope that it will be useful, but WITHOUT 10221828Sgrehan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11221828Sgrehan * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12221828Sgrehan * version 2 for more details (a copy is included in the LICENSE file that 13221828Sgrehan * accompanied this code). 14221828Sgrehan * 15221828Sgrehan * You should have received a copy of the GNU General Public License version 16221828Sgrehan * 2 along with this work; if not, write to the Free Software Foundation, 17221828Sgrehan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18221828Sgrehan * 19221828Sgrehan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20221828Sgrehan * or visit www.oracle.com if you need additional information or have any 21221828Sgrehan * questions. 22221828Sgrehan */ 23221828Sgrehan 24221828Sgrehan/* 25221828Sgrehan * @test 26245678Sneel * @bug 4749567 27221828Sgrehan * @summary Test the output for -header and -footer options. 28221828Sgrehan * @author Bhavesh Patel 29221828Sgrehan * @library ../lib 30221828Sgrehan * @modules jdk.javadoc/jdk.javadoc.internal.tool 31221828Sgrehan * @build JavadocTester 32269042Sneel * @run main TestOptions 33269042Sneel */ 34265062Sneel 35265062Sneelpublic class TestOptions extends JavadocTester { 36265062Sneel 37265062Sneel public static void main(String... args) throws Exception { 38265203Sneel TestOptions tester = new TestOptions(); 39268889Sneel tester.runTests(); 40265062Sneel } 41265062Sneel 42265062Sneel @Test 43267338Stychon void test() { 44267338Stychon javadoc("-d", "out", 45267338Stychon "-header", "Test header", 46267338Stychon "-footer", "Test footer", 47267338Stychon "-sourcepath", testSrc, 48267338Stychon "pkg"); 49267338Stychon checkExit(Exit.OK); 50267338Stychon 51267338Stychon checkOutput("pkg/package-summary.html", true, 52267338Stychon "<div class=\"aboutLanguage\">Test header</div>", 53267338Stychon "<div class=\"aboutLanguage\">Test footer</div>"); 54267338Stychon } 55267338Stychon} 56267338Stychon 57267338Stychon