test/tools/javadoc/parser/7091528/T7091528.java

changeset 2281
b06e33ab7f61
parent 1094
dea82aa3ca4f
child 2367
1737ad9ac984
     1.1 --- a/test/tools/javadoc/parser/7091528/T7091528.java	Wed Feb 19 15:07:47 2014 +0400
     1.2 +++ b/test/tools/javadoc/parser/7091528/T7091528.java	Fri Feb 14 17:28:07 2014 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -23,8 +23,8 @@
    1.11  
    1.12  /**
    1.13   * @test
    1.14 - * @bug     7091528
    1.15 - * @summary javadoc attempts to parse .class files
    1.16 + * @bug     7091528 8029145
    1.17 + * @summary ensures javadoc parses unique source files and ignores all class files
    1.18   * @compile p/C1.java p/q/C2.java
    1.19   * @run main T7091528
    1.20   */
    1.21 @@ -37,17 +37,22 @@
    1.22      public static void main(String... args) {
    1.23          new T7091528().run();
    1.24      }
    1.25 -
    1.26      void run() {
    1.27          File testSrc = new File(System.getProperty("test.src"));
    1.28          File testClasses = new File(System.getProperty("test.classes"));
    1.29 -        String[] args = {
    1.30 -            "-d", ".",
    1.31 +        // 7091528, tests if class files are being ignored
    1.32 +        runTest("-d", ".",
    1.33              "-sourcepath", testClasses + File.pathSeparator + testSrc,
    1.34              "-subpackages",
    1.35 -            "p"
    1.36 -        };
    1.37 +            "p");
    1.38 +        // 8029145, tests if unique source files are parsed
    1.39 +        runTest("-d", ".",
    1.40 +            "-sourcepath", testSrc.getAbsolutePath(),
    1.41 +            "-subpackages",
    1.42 +            "p:p.q");
    1.43  
    1.44 +    }
    1.45 +    void runTest(String... args) {
    1.46          StringWriter sw = new StringWriter();
    1.47          PrintWriter pw = new PrintWriter(sw);
    1.48          String doclet = com.sun.tools.doclets.standard.Standard.class.getName();

mercurial