diff -r 601a611d0aee -r af1a0220d0fa langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java --- a/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Fri May 09 23:31:05 2014 +0200 +++ b/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Fri May 09 15:37:12 2014 -0700 @@ -27,33 +27,27 @@ * @summary Test to make sure that Javadoc emits a useful warning * when a bad package.html file is in the JAR. * @author jamieh - * @library ../lib/ + * @library ../lib * @build JavadocTester - * @build TestBadPackageFileInJar * @run main TestBadPackageFileInJar */ public class TestBadPackageFileInJar extends JavadocTester { - private static final String[][] TEST = - new String[][] { - {ERROR_OUTPUT, - "badPackageFileInJar.jar" + FS + "pkg/package.html: error - Body tag missing from HTML"} - }; + public static void main(String... args) throws Exception { + TestBadPackageFileInJar tester = new TestBadPackageFileInJar(); + tester.runTests(); + } - private static final String[] ARGS = - new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-classpath", - SRC_DIR + "/badPackageFileInJar.jar", "pkg"}; - + @Test + void test() { + javadoc("-d", "out", + "-sourcepath", testSrc, + "-classpath", testSrc("badPackageFileInJar.jar"), + "pkg"); + checkExit(Exit.FAILED); - /** - * The entry point of the test. - * @param args the array of command line arguments. - */ - public static void main(String[] args) { - TestBadPackageFileInJar tester = new TestBadPackageFileInJar(); - tester.run(ARGS, TEST, NO_TEST); - tester.printSummary(); + checkOutput(Output.ERROR, true, + "badPackageFileInJar.jar" + FS + "pkg/package.html: error - Body tag missing from HTML"); } }