langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java
changeset 9170 56670ec8e643
parent 8841 b4422fa4f2e6
child 14060 ae69cea86e83
--- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java	Tue Apr 12 10:32:42 2011 -0400
+++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java	Thu Apr 14 11:02:05 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4496290 4985072
+ * @bug 4496290 4985072 7006178
  * @summary A simple test to determine if -use works.
  * @author jamieh
  * @library ../lib/
@@ -34,7 +34,7 @@
 
 public class TestUseOption extends JavadocTester {
 
-    private static final String BUG_ID = "4496290-4985072";
+    private static final String BUG_ID = "4496290-4985072-7006178";
 
     //Input for string search tests.
     private static final String[] TEST2 = {
@@ -54,6 +54,16 @@
         "Method in C8.",
     };
 
+    private static final String[][] TEST3 = {
+        {BUG_ID + "-3" + FS + "class-use" + FS + "UsedInC.html", "Uses of <a href=" +
+                 "\"../UsedInC.html\" title=\"class in &lt;Unnamed&gt;\">" +
+                 "UsedInC</a> in <a href=\"../package-summary.html\">&lt;Unnamed&gt;</a>"
+        },
+        {BUG_ID + "-3" + FS + "package-use.html", "<td class=\"colOne\">" +
+                 "<a href=\"class-use/UsedInC.html#&lt;Unnamed&gt;\">UsedInC</a>&nbsp;</td>"
+        }
+    };
+
     private static final String[] ARGS = new String[] {
         "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
     };
@@ -62,6 +72,10 @@
         "-d", BUG_ID+"-2", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
     };
 
+    private static final String[] ARGS3 = new String[] {
+        "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java"
+    };
+
     /**
      * The entry point of the test.
      * @param args the array of command line arguments.
@@ -93,6 +107,8 @@
             prevIndex = currentIndex;
         }
         tester.printSummary();
+        run(tester, ARGS3, TEST3, NO_TEST);
+        tester.printSummary();
     }
 
     /**