TestSingleQuotedLink.java revision 3294:9adfb22ff08f
1101776Stjr/* 2129583Stjr * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 3101776Stjr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4101776Stjr * 5227753Stheraven * This code is free software; you can redistribute it and/or modify it 6227753Stheraven * under the terms of the GNU General Public License version 2 only, as 7227753Stheraven * published by the Free Software Foundation. 8227753Stheraven * 9227753Stheraven * This code is distributed in the hope that it will be useful, but WITHOUT 10101776Stjr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11101776Stjr * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12101776Stjr * version 2 for more details (a copy is included in the LICENSE file that 13101776Stjr * accompanied this code). 14101776Stjr * 15101776Stjr * You should have received a copy of the GNU General Public License version 16101776Stjr * 2 along with this work; if not, write to the Free Software Foundation, 17101776Stjr * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18101776Stjr * 19101776Stjr * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20101776Stjr * or visit www.oracle.com if you need additional information or have any 21101776Stjr * questions. 22101776Stjr */ 23101776Stjr 24101776Stjr/* 25101776Stjr * @test 26101776Stjr * @bug 6457406 27101776Stjr * @summary Verify that a link in single quotes copied to the class-use page as is. 28101776Stjr * @author Yuri Nesterenko 29101776Stjr * @library ../lib 30101776Stjr * @modules jdk.javadoc/jdk.javadoc.internal.tool 31101776Stjr * @build JavadocTester 32101776Stjr * @run main TestSingleQuotedLink 33101776Stjr */ 34101776Stjrpublic class TestSingleQuotedLink extends JavadocTester { 35101776Stjr 36101776Stjr public static void main(String... args) throws Exception { 37101776Stjr TestSingleQuotedLink tester = new TestSingleQuotedLink(); 38103523Stjr tester.runTests(); 39101776Stjr } 40101776Stjr 41101776Stjr @Test 42101776Stjr void run() { 43132442Stjr javadoc("-d", "out", 44227753Stheraven "-sourcepath", testSrc, 45101776Stjr "-use", 46103676Stjr "pkg1"); 47103676Stjr checkExit(Exit.OK); 48103676Stjr 49103676Stjr // We are testing the redirection algorithm with a known scenario when a 50227753Stheraven // writer is not forced to ignore it: "-use". 51103676Stjr 52103676Stjr checkOutput("pkg1/class-use/C1.html", true, 53227753Stheraven "<a href=\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>"); 54103676Stjr 55103676Stjr checkOutput("pkg1/class-use/C1.html", false, 56103676Stjr "pkg1/\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>"); 57227753Stheraven } 58103676Stjr} 59103676Stjr