TestOptions.java revision 3233:b5d08bc0d224
1190684Smarcel/* 2190684Smarcel * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. 3190684Smarcel * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4190684Smarcel * 5190684Smarcel * This code is free software; you can redistribute it and/or modify it 6190684Smarcel * under the terms of the GNU General Public License version 2 only, as 7190684Smarcel * published by the Free Software Foundation. 8190684Smarcel * 9190684Smarcel * This code is distributed in the hope that it will be useful, but WITHOUT 10190684Smarcel * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11190684Smarcel * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12190684Smarcel * version 2 for more details (a copy is included in the LICENSE file that 13190684Smarcel * accompanied this code). 14190684Smarcel * 15190684Smarcel * You should have received a copy of the GNU General Public License version 16190684Smarcel * 2 along with this work; if not, write to the Free Software Foundation, 17190684Smarcel * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18190684Smarcel * 19190684Smarcel * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20190684Smarcel * or visit www.oracle.com if you need additional information or have any 21190684Smarcel * questions. 22190684Smarcel */ 23190684Smarcel 24190684Smarcel/* 25190684Smarcel * @test 26190684Smarcel * @bug 4749567 27190684Smarcel * @summary Test the output for -header and -footer options. 28190684Smarcel * @author Bhavesh Patel 29190684Smarcel * @library ../lib 30190684Smarcel * @modules jdk.javadoc 31190684Smarcel * @build JavadocTester 32190684Smarcel * @run main TestOptions 33190684Smarcel */ 34190684Smarcel 35190684Smarcelpublic class TestOptions extends JavadocTester { 36276772Smarkj 37276772Smarkj public static void main(String... args) throws Exception { 38276772Smarkj TestOptions tester = new TestOptions(); 39 tester.runTests(); 40 } 41 42 @Test 43 void test() { 44 javadoc("-d", "out", 45 "-header", "Test header", 46 "-footer", "Test footer", 47 "-sourcepath", testSrc, 48 "pkg"); 49 checkExit(Exit.OK); 50 51 checkOutput("pkg/package-summary.html", true, 52 "<div class=\"aboutLanguage\">Test header</div>", 53 "<div class=\"aboutLanguage\">Test footer</div>"); 54 } 55} 56 57