langtools/test/com/sun/javadoc/testOptions/TestOptions.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
--- a/langtools/test/com/sun/javadoc/testOptions/TestOptions.java	Fri May 09 23:31:05 2014 +0200
+++ b/langtools/test/com/sun/javadoc/testOptions/TestOptions.java	Fri May 09 15:37:12 2014 -0700
@@ -26,34 +26,30 @@
  * @bug      4749567
  * @summary  Test the output for -header and -footer options.
  * @author   Bhavesh Patel
- * @library  ../lib/
- * @build    JavadocTester TestOptions
+ * @library  ../lib
+ * @build    JavadocTester
  * @run main TestOptions
  */
 
 public class TestOptions extends JavadocTester {
 
-    //Javadoc arguments.
-    private static final String[] ARGS = new String[] {
-        "-d", OUTPUT_DIR, "-header", "Test header", "-footer", "Test footer",
-        "-sourcepath", SRC_DIR, "pkg"
-    };
+    public static void main(String... args) throws Exception {
+        TestOptions tester = new TestOptions();
+        tester.runTests();
+    }
 
-    private static final String[][] TEST = {
-        { "pkg/package-summary.html",
-            "<div class=\"aboutLanguage\">Test header</div>"},
-        { "pkg/package-summary.html",
-            "<div class=\"aboutLanguage\">Test footer</div>"}
-    };
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-header", "Test header",
+                "-footer", "Test footer",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
 
-    /**
-     * The entry point of the test.
-     * @param args the array of command line arguments.
-     */
-    public static void main(String[] args) {
-        TestOptions tester = new TestOptions();
-        tester.run(ARGS, TEST, NO_TEST);
-        tester.printSummary();
+        checkOutput("pkg/package-summary.html", true,
+                "<div class=\"aboutLanguage\">Test header</div>",
+                "<div class=\"aboutLanguage\">Test footer</div>");
     }
 }