test/langtools/tools/javadoc/BadOptionsTest.java
author dstewart
Thu, 29 Mar 2018 16:07:39 -0400
changeset 49649 17c6ab93710e
parent 47216 71c04702a3d5
child 49822 53aae0c219e6
permissions -rw-r--r--
8200251: AArch64::CPUFeature out of sync with VM_Version::Feature_Flag Summary: Added enums to CPUFeature to be in sync with VM_Version::Feature_Flag Reviewed-by: kvn, aph, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     1
/*
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
     2
 * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     4
 *
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     8
 *
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    13
 * accompanied this code).
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    14
 *
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    18
 *
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    21
 * questions.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    22
 */
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    23
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    24
/*
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    25
 * @test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    26
 * @bug 8169676
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    27
 * @summary boolean result of Option.process is often ignored
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    28
 * @modules jdk.compiler/com.sun.tools.javac.api
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    29
 * @modules jdk.compiler/com.sun.tools.javac.main
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    30
 * @modules jdk.javadoc/jdk.javadoc.internal.api
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    31
 * @modules jdk.javadoc/jdk.javadoc.internal.tool
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    32
 * @library /tools/lib /tools/javadoc/lib
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    33
 * @build toolbox.JavacTask toolbox.JavadocTask toolbox.TestRunner toolbox.ToolBox ToyDoclet
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    34
 * @run main BadOptionsTest
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    35
 */
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    36
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    37
import java.io.IOException;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    38
import java.nio.file.Path;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    39
import java.nio.file.Paths;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    40
import java.util.ArrayList;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    41
import java.util.Arrays;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    42
import java.util.HashSet;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    43
import java.util.List;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    44
import java.util.ListIterator;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    45
import java.util.Locale;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    46
import java.util.Objects;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    47
import java.util.Set;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    48
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    49
import javax.lang.model.SourceVersion;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    50
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    51
import jdk.javadoc.doclet.Doclet;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    52
import jdk.javadoc.doclet.DocletEnvironment;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    53
import jdk.javadoc.doclet.Reporter;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    54
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    55
import toolbox.JavadocTask;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    56
import toolbox.ModuleBuilder;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    57
import toolbox.Task;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    58
import toolbox.TestRunner;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    59
import toolbox.ToolBox;
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    60
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    61
/*
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    62
 * This is primarily a test of the error reporting mechanisms
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    63
 * for bad options provided by javac and utilized by javadoc.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    64
 * It is not an exhaustive test of all bad option forms detected
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    65
 * by javac/javadoc.
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    66
 */
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    67
public class BadOptionsTest extends TestRunner {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    68
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    69
    public static void main(String... args) throws Exception {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    70
        BadOptionsTest t = new BadOptionsTest();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    71
        t.runTests();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    72
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    73
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    74
    private final ToolBox tb = new ToolBox();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    75
    private final Path src = Paths.get("src");
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    76
    private final Class<?> docletClass;
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    77
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    78
    BadOptionsTest() throws Exception {
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    79
        super(System.err);
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    80
        docletClass = getClass().getClassLoader().loadClass("ToyDoclet");
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    81
        init();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    82
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    83
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    84
    void init() throws IOException {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    85
        tb.writeJavaFiles(src,
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    86
                "public class C { }");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    87
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    88
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    89
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    90
    @Test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    91
    public void testAddModulesEmptyArg() {
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    92
        Task.Result result = new JavadocTask(tb, Task.Mode.API)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    93
                .docletClass(docletClass)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
    94
                .options("--add-modules", "")
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    95
                .files(src.resolve("C.java"))
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    96
                .run(Task.Expect.FAIL)
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    97
                .writeAll();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    98
        checkFound(result.getOutput(Task.OutputKind.DIRECT),
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
    99
                "javadoc: error - no value for --add-modules option");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   100
        checkNotFound(result, "Exception", "at jdk.javadoc/");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   101
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   102
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   103
    @Test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   104
    public void testAddModulesBadName() {
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   105
        Task.Result result = new JavadocTask(tb, Task.Mode.API)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   106
                .docletClass(docletClass)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   107
                .options("--add-modules", "123")
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   108
                .files(src.resolve("C.java"))
42269
24a766b7c106 8164590: javac --inherit-runtime-environment fails with "cannot find modules: ALL-DEFAULT"
jjg
parents: 42260
diff changeset
   109
                .run(Task.Expect.FAIL)
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   110
                .writeAll();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   111
        checkFound(result.getOutput(Task.OutputKind.DIRECT),
42269
24a766b7c106 8164590: javac --inherit-runtime-environment fails with "cannot find modules: ALL-DEFAULT"
jjg
parents: 42260
diff changeset
   112
                "error: bad name in value for --add-modules option: '123'");
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   113
        checkNotFound(result, "Exception", "at jdk.javadoc/");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   114
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   115
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   116
    @Test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   117
    public void testAddExportsEmptyArg() {
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   118
        Task.Result result = new JavadocTask(tb, Task.Mode.API)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   119
                .docletClass(docletClass)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   120
                .options("--add-exports", "")
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   121
                .files(src.resolve("C.java"))
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   122
                .run(Task.Expect.FAIL)
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   123
                .writeAll();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   124
        checkFound(result.getOutput(Task.OutputKind.DIRECT),
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   125
                "javadoc: error - no value for --add-exports option");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   126
        checkNotFound(result, "Exception", "at jdk.javadoc/");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   127
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   128
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   129
    @Test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   130
    public void testAddExportsBadArg() {
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   131
        Task.Result result = new JavadocTask(tb, Task.Mode.API)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   132
                .docletClass(docletClass)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   133
                .options("--add-exports", "m/p")
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   134
                .files(src.resolve("C.java"))
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   135
                .run(Task.Expect.FAIL)
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   136
                .writeAll();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   137
        checkFound(result.getOutput(Task.OutputKind.DIRECT),
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   138
                "javadoc: error - bad value for --add-exports option");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   139
        checkNotFound(result, "Exception", "at jdk.javadoc/");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   140
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   141
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   142
    @Test
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   143
    public void testAddExportsBadName() {
45742
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   144
        Task.Result result = new JavadocTask(tb, Task.Mode.API)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   145
                .docletClass(docletClass)
36bf0f2436ad 8177511: Remove the old standard doclet
ksrini
parents: 42269
diff changeset
   146
                .options("--add-exports", "m!/p1=m2")
42260
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   147
                .files(src.resolve("C.java"))
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   148
                .run()
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   149
                .writeAll();
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   150
        checkFound(result.getOutput(Task.OutputKind.DIRECT),
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   151
                "warning: bad name in value for --add-exports option: 'm!'");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   152
        checkNotFound(result, "Exception", "at jdk.javadoc/");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   153
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   154
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   155
    private void checkFound(String log, String... expect) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   156
        for (String e : expect) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   157
            if (!log.contains(e)) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   158
                error("Expected string not found: '" + e + "'");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   159
            }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   160
        }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   161
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   162
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   163
    private void checkNotFound(Task.Result result, String... unexpected) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   164
        for (Task.OutputKind k : Task.OutputKind.values()) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   165
            String r = result.getOutput(k);
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   166
            for (String u : unexpected) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   167
                if (r.contains(u)) {
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   168
                    error("Unexpected string found: '" + u + "'");
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   169
                }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   170
            }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   171
        }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   172
    }
2b4da2bf6660 8169676: boolean result of Option.process is often ignored
jjg
parents:
diff changeset
   173
}