langtools/test/com/sun/javadoc/testLinkOption/TestNewLineInLink.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
equal deleted inserted replaced
24398:601a611d0aee 24399:af1a0220d0fa
    25  * @test
    25  * @test
    26  * @bug 4739870
    26  * @bug 4739870
    27  * @summary Make sure that a new line may act as a separator between
    27  * @summary Make sure that a new line may act as a separator between
    28  * link and label.
    28  * link and label.
    29  * @author jamieh
    29  * @author jamieh
    30  * @library ../lib/
    30  * @library ../lib
    31  * @build JavadocTester
    31  * @build JavadocTester
    32  * @build TestNewLineInLink
       
    33  * @run main TestNewLineInLink
    32  * @run main TestNewLineInLink
    34  */
    33  */
    35 
    34 
    36 public class TestNewLineInLink extends JavadocTester {
    35 public class TestNewLineInLink extends JavadocTester {
    37 
    36 
    38     private static final String[][] NEGATED_TEST =
    37     public static void main(String... args) throws Exception {
    39         new String[][] {
    38         TestNewLineInLink tester = new TestNewLineInLink();
    40             {ERROR_OUTPUT,
    39         tester.runTests();
    41                 "illegal character"}
    40     }
    42         };
       
    43 
    41 
    44     private static final String[] ARGS = new String[] {
    42     @Test
    45             "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR,
    43     void test() {
    46                 "-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api",
    44         javadoc("-d", "out",
    47                 SRC_DIR, "testNewLineInLink"};
    45                 "-sourcepath", testSrc,
       
    46                 "-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", testSrc,
       
    47                 "testNewLineInLink");
       
    48         checkExit(Exit.OK);
    48 
    49 
    49     /**
    50         checkOutput(Output.ERROR, false,
    50      * The entry point of the test.
    51                 "illegal character");
    51      * @param args the array of command line arguments.
       
    52      */
       
    53     public static void main(String[] args) {
       
    54         TestNewLineInLink tester = new TestNewLineInLink();
       
    55         tester.run(ARGS, new String[][] {}, NEGATED_TEST);
       
    56         tester.printSummary();
       
    57     }
    52     }
    58 }
    53 }