test/langtools/tools/jdeps/Basic.java
changeset 52650 c16b6cc93272
parent 47216 71c04702a3d5
--- a/test/langtools/tools/jdeps/Basic.java	Wed Nov 21 22:33:33 2018 -0800
+++ b/test/langtools/tools/jdeps/Basic.java	Wed Nov 21 22:34:01 2018 -0800
@@ -37,6 +37,7 @@
 import java.io.StringWriter;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.*;
 import java.util.regex.*;
 import java.util.stream.Collectors;
@@ -135,6 +136,19 @@
              new String[] {"java.lang.Object", "java.lang.String", "p.Foo", "p.Bar"},
              new String[] {"compact1", "compact1", dir1.toFile().getName(), dir2.toFile().getName()},
              new String[] {"-v", "-classpath", cpath.toString(), "Test.class"});
+
+        // tests --missing-deps option
+        test(new File(testDir, "Test.class"),
+             new String[] {"p.Foo", "p.Bar"},
+             new String[] {"not found", "not found"},
+             new String[] {"--missing-deps"});
+
+        // no missing dependence
+        test(new File(testDir, "Test.class"),
+             new String[0],
+             new String[0],
+             new String[] {"--missing-deps", "-classpath", cpath.toString()});
+
         return errors;
     }