TestBadLinkOption.java revision 3233:b5d08bc0d224
146969Smjacob/* 246969Smjacob * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. 335388Smjacob * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 435388Smjacob * 535388Smjacob * This code is free software; you can redistribute it and/or modify it 635388Smjacob * under the terms of the GNU General Public License version 2 only, as 735388Smjacob * published by the Free Software Foundation. 835388Smjacob * 935388Smjacob * This code is distributed in the hope that it will be useful, but WITHOUT 1035388Smjacob * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1135388Smjacob * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1235388Smjacob * version 2 for more details (a copy is included in the LICENSE file that 1335388Smjacob * accompanied this code). 1435388Smjacob * 1535388Smjacob * You should have received a copy of the GNU General Public License version 1635388Smjacob * 2 along with this work; if not, write to the Free Software Foundation, 1735388Smjacob * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1835388Smjacob * 1935388Smjacob * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2035388Smjacob * or visit www.oracle.com if you need additional information or have any 2135388Smjacob * questions. 2235388Smjacob */ 2335388Smjacob 2435388Smjacob/* 2535388Smjacob * @test 2635388Smjacob * @bug 4625883 2735388Smjacob * @summary Make sure that bad -link arguments trigger warnings. 2835388Smjacob * @author jamieh 2935388Smjacob * @library ../lib 3035388Smjacob * @modules jdk.javadoc 3135388Smjacob * @build JavadocTester 3235388Smjacob * @run main TestBadLinkOption 3335388Smjacob */ 3435388Smjacob 3535388Smjacobpublic class TestBadLinkOption extends JavadocTester { 3635388Smjacob 3735388Smjacob public static void main(String... args) throws Exception { 3839235Sgibbs TestBadLinkOption tester = new TestBadLinkOption(); 3945284Smjacob tester.runTests(); 4039235Sgibbs } 4139445Smjacob 4239445Smjacob @Test 4339445Smjacob void test() { 4439445Smjacob String out = "out"; 4539445Smjacob javadoc("-d", out, 4639445Smjacob "-sourcepath", testSrc, 4739445Smjacob "-link", out, 4844819Smjacob "pkg"); 4939235Sgibbs checkExit(Exit.OK); 5039235Sgibbs 5145284Smjacob // TODO: the file it is trying to read, out/out/package-list, warrants investigation 5245284Smjacob checkOutput(Output.OUT, true, 5345284Smjacob "Error reading file:"); 5445284Smjacob } 5539235Sgibbs} 5635388Smjacob