author | rfield |
Mon, 09 Jan 2017 18:04:16 -0800 | |
changeset 43134 | 006808ae5f6e |
parent 43038 | 7b8b8750a78e |
child 44454 | 74af976d6798 |
permissions | -rw-r--r-- |
33362 | 1 |
/* |
36494 | 2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
33362 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
43038 | 26 |
* @bug 8144095 8164825 8169818 8153402 8165405 |
33362 | 27 |
* @summary Test Command Completion |
35359 | 28 |
* @modules jdk.compiler/com.sun.tools.javac.api |
29 |
* jdk.compiler/com.sun.tools.javac.main |
|
36526 | 30 |
* jdk.jdeps/com.sun.tools.javap |
35359 | 31 |
* jdk.jshell/jdk.internal.jshell.tool |
33362 | 32 |
* @library /tools/lib |
36778
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36526
diff
changeset
|
33 |
* @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask |
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36526
diff
changeset
|
34 |
* @build ReplToolTesting TestingInputStream Compiler |
33362 | 35 |
* @run testng CommandCompletionTest |
36 |
*/ |
|
37 |
||
38 |
import java.io.IOException; |
|
39 |
import java.nio.file.FileSystems; |
|
40 |
import java.nio.file.Files; |
|
41 |
import java.nio.file.Path; |
|
42 |
import java.nio.file.Paths; |
|
40765
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
43 |
import java.util.Arrays; |
33362 | 44 |
import java.util.Collections; |
45 |
import java.util.List; |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
46 |
import java.util.Locale; |
33362 | 47 |
import java.util.function.Predicate; |
48 |
import java.util.stream.Collectors; |
|
49 |
import java.util.stream.Stream; |
|
42415
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
50 |
import java.util.stream.StreamSupport; |
33362 | 51 |
|
52 |
import org.testng.annotations.Test; |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
53 |
import jdk.internal.jshell.tool.JShellTool; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
54 |
import jdk.internal.jshell.tool.JShellToolBuilder; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
55 |
import jdk.jshell.SourceCodeAnalysis.Suggestion; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
56 |
import static org.testng.Assert.assertEquals; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
57 |
import static org.testng.Assert.assertTrue; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
58 |
import static org.testng.Assert.fail; |
33362 | 59 |
|
60 |
public class CommandCompletionTest extends ReplToolTesting { |
|
61 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
62 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
63 |
private JShellTool repl; |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
64 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
65 |
@Override |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
66 |
protected void testRawRun(Locale locale, String[] args) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
67 |
repl = ((JShellToolBuilder) builder(locale)) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
68 |
.rawTool(); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
69 |
try { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
70 |
repl.start(args); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
71 |
} catch (Exception ex) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
72 |
fail("Repl tool died with exception", ex); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
73 |
} |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
74 |
} |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
75 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
76 |
public void assertCompletion(boolean after, String code, boolean isSmart, String... expected) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
77 |
if (!after) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
78 |
setCommandInput("\n"); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
79 |
} else { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
80 |
assertCompletion(code, isSmart, expected); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
81 |
} |
33362 | 82 |
} |
83 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
84 |
public void assertCompletion(String code, boolean isSmart, String... expected) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
85 |
List<String> completions = computeCompletions(code, isSmart); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
86 |
assertEquals(completions, Arrays.asList(expected), "Command: " + code + ", output: " + |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
87 |
completions.toString()); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
88 |
} |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
89 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
90 |
private List<String> computeCompletions(String code, boolean isSmart) { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
91 |
int cursor = code.indexOf('|'); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
92 |
code = code.replace("|", ""); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
93 |
assertTrue(cursor > -1, "'|' not found: " + code); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
94 |
List<Suggestion> completions = |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
95 |
repl.commandCompletionSuggestions(code, cursor, new int[] {-1}); //XXX: ignoring anchor for now |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
96 |
return completions.stream() |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
97 |
.filter(s -> isSmart == s.matchesType()) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
98 |
.map(s -> s.continuation()) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
99 |
.distinct() |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
100 |
.collect(Collectors.toList()); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
101 |
} |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
102 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
103 |
@Test |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
104 |
public void testCommand() { |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
105 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
106 |
a -> assertCompletion(a, "/deb|", false), |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
107 |
a -> assertCompletion(a, "/re|", false, "/reload ", "/reset "), |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
108 |
a -> assertCompletion(a, "/h|", false, "/help ", "/history ") |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
109 |
); |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
110 |
} |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
111 |
|
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
112 |
@Test |
33362 | 113 |
public void testList() { |
40588
b5c32bfa9710
8160089: jshell tool: use new double-dash long-form command-line options
rfield
parents:
38531
diff
changeset
|
114 |
test(false, new String[] {"--no-startup"}, |
34570
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
115 |
a -> assertCompletion(a, "/l|", false, "/list "), |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
116 |
a -> assertCompletion(a, "/list |", false, "-all", "-history", "-start "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
117 |
a -> assertCompletion(a, "/list -h|", false, "-history"), |
34570
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
118 |
a -> assertCompletion(a, "/list q|", false), |
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
119 |
a -> assertVariable(a, "int", "xray"), |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
120 |
a -> assertCompletion(a, "/list |", false, "-all", "-history", "-start ", "1 ", "xray "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
121 |
a -> assertCompletion(a, "/list x|", false, "xray "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
122 |
a -> assertCompletion(a, "/list xray |", false) |
34570
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
123 |
); |
33362 | 124 |
} |
125 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
126 |
@Test |
33362 | 127 |
public void testDrop() { |
40588
b5c32bfa9710
8160089: jshell tool: use new double-dash long-form command-line options
rfield
parents:
38531
diff
changeset
|
128 |
test(false, new String[] {"--no-startup"}, |
34570
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
129 |
a -> assertCompletion(a, "/d|", false, "/drop "), |
33362 | 130 |
a -> assertClass(a, "class cTest {}", "class", "cTest"), |
131 |
a -> assertMethod(a, "int mTest() { return 0; }", "()I", "mTest"), |
|
132 |
a -> assertVariable(a, "int", "fTest"), |
|
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
133 |
a -> assertCompletion(a, "/drop |", false, "1 ", "2 ", "3 ", "cTest ", "fTest ", "mTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
134 |
a -> assertCompletion(a, "/drop f|", false, "fTest ") |
33362 | 135 |
); |
136 |
} |
|
137 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
138 |
@Test |
33362 | 139 |
public void testEdit() { |
40588
b5c32bfa9710
8160089: jshell tool: use new double-dash long-form command-line options
rfield
parents:
38531
diff
changeset
|
140 |
test(false, new String[]{"--no-startup"}, |
43038 | 141 |
a -> assertCompletion(a, "/e|", false, "/edit ", "/env ", "/exit "), |
34570
8a8f52a733dd
8144095: jshell tool: normalize command parameter handling
rfield
parents:
34475
diff
changeset
|
142 |
a -> assertCompletion(a, "/ed|", false, "/edit "), |
33362 | 143 |
a -> assertClass(a, "class cTest {}", "class", "cTest"), |
144 |
a -> assertMethod(a, "int mTest() { return 0; }", "()I", "mTest"), |
|
145 |
a -> assertVariable(a, "int", "fTest"), |
|
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
146 |
a -> assertCompletion(a, "/edit |", false, |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
147 |
"-all" , "-start " , "1 ", "2 ", "3 ", "cTest ", "fTest ", "mTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
148 |
a -> assertCompletion(a, "/edit cTest |", false, |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
149 |
"2 ", "3 ", "fTest ", "mTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
150 |
a -> assertCompletion(a, "/edit 1 fTest |", false, |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
151 |
"2 ", "mTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
152 |
a -> assertCompletion(a, "/edit f|", false, "fTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
153 |
a -> assertCompletion(a, "/edit mTest f|", false, "fTest ") |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
154 |
); |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
155 |
} |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
156 |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
157 |
@Test |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
158 |
public void testHelp() { |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
159 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
160 |
a -> assertCompletion(a, "/help |", false, |
43038 | 161 |
"/! ", "/-<n> ", "/<id> ", "/? ", "/drop ", |
162 |
"/edit ", "/env ", "/exit ", |
|
163 |
"/help ", "/history ", "/imports ", |
|
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
164 |
"/list ", "/methods ", "/open ", "/reload ", "/reset ", |
43038 | 165 |
"/save ", "/set ", "/types ", "/vars ", "context ", "intro ", "shortcuts "), |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
166 |
a -> assertCompletion(a, "/? |", false, |
43038 | 167 |
"/! ", "/-<n> ", "/<id> ", "/? ", "/drop ", |
168 |
"/edit ", "/env ", "/exit ", |
|
169 |
"/help ", "/history ", "/imports ", |
|
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
170 |
"/list ", "/methods ", "/open ", "/reload ", "/reset ", |
43038 | 171 |
"/save ", "/set ", "/types ", "/vars ", "context ", "intro ", "shortcuts "), |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
172 |
a -> assertCompletion(a, "/help /s|", false, |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
173 |
"/save ", "/set "), |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
174 |
a -> assertCompletion(a, "/help /set |", false, |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
175 |
"editor", "feedback", "format", "mode", "prompt", "start", "truncation"), |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
176 |
a -> assertCompletion(a, "/help /edit |", false) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
177 |
); |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
178 |
} |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
179 |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
180 |
@Test |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
181 |
public void testReload() { |
43038 | 182 |
String[] ropts = new String[] { "-add-exports ", "-add-modules ", |
183 |
"-class-path ", "-module-path ", "-quiet ", "-restore " }; |
|
184 |
String[] dropts = new String[] { "--add-exports ", "--add-modules ", |
|
185 |
"--class-path ", "--module-path ", "--quiet ", "--restore " }; |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
186 |
testNoStartUp( |
43038 | 187 |
a -> assertCompletion(a, "/reloa |", false, ropts), |
188 |
a -> assertCompletion(a, "/relo |", false, ropts), |
|
189 |
a -> assertCompletion(a, "/reload -|", false, ropts), |
|
190 |
a -> assertCompletion(a, "/reload --|", false, dropts), |
|
191 |
a -> assertCompletion(a, "/reload -restore |", false, ropts), |
|
192 |
a -> assertCompletion(a, "/reload -restore --|", false, dropts), |
|
193 |
a -> assertCompletion(a, "/reload -rest|", false, "-restore "), |
|
194 |
a -> assertCompletion(a, "/reload --r|", false, "--restore "), |
|
195 |
a -> assertCompletion(a, "/reload -q|", false, "-quiet "), |
|
196 |
a -> assertCompletion(a, "/reload -add|", false, "-add-exports ", "-add-modules "), |
|
197 |
a -> assertCompletion(a, "/reload -class-path . -quiet |", false, ropts) |
|
198 |
); |
|
199 |
} |
|
200 |
||
201 |
@Test |
|
202 |
public void testEnv() { |
|
203 |
String[] ropts = new String[] { "-add-exports ", "-add-modules ", |
|
204 |
"-class-path ", "-module-path " }; |
|
205 |
String[] dropts = new String[] { "--add-exports ", "--add-modules ", |
|
206 |
"--class-path ", "--module-path " }; |
|
207 |
testNoStartUp( |
|
208 |
a -> assertCompletion(a, "/env |", false, ropts), |
|
209 |
a -> assertCompletion(a, "/env -|", false, ropts), |
|
210 |
a -> assertCompletion(a, "/env --|", false, dropts), |
|
211 |
a -> assertCompletion(a, "/env --a|", false, "--add-exports ", "--add-modules "), |
|
212 |
a -> assertCompletion(a, "/env -add-|", false, "-add-exports ", "-add-modules "), |
|
213 |
a -> assertCompletion(a, "/env -class-path . |", false, ropts), |
|
214 |
a -> assertCompletion(a, "/env -class-path . --|", false, dropts) |
|
215 |
); |
|
216 |
} |
|
217 |
||
218 |
@Test |
|
219 |
public void testReset() { |
|
220 |
String[] ropts = new String[] { "-add-exports ", "-add-modules ", |
|
221 |
"-class-path ", "-module-path " }; |
|
222 |
String[] dropts = new String[] { "--add-exports ", "--add-modules ", |
|
223 |
"--class-path ", "--module-path " }; |
|
224 |
testNoStartUp( |
|
225 |
a -> assertCompletion(a, "/reset |", false, ropts), |
|
226 |
a -> assertCompletion(a, "/res -m|", false, "-module-path "), |
|
227 |
a -> assertCompletion(a, "/res -module-|", false, "-module-path "), |
|
228 |
a -> assertCompletion(a, "/res --m|", false, "--module-path "), |
|
229 |
a -> assertCompletion(a, "/res --module-|", false, "--module-path "), |
|
230 |
a -> assertCompletion(a, "/reset -add|", false, "-add-exports ", "-add-modules "), |
|
231 |
a -> assertCompletion(a, "/rese -class-path . |", false, ropts), |
|
232 |
a -> assertCompletion(a, "/rese -class-path . --|", false, dropts) |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
233 |
); |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
234 |
} |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
235 |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
236 |
@Test |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
237 |
public void testVarsMethodsTypes() { |
43038 | 238 |
testNoStartUp( |
42265
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
239 |
a -> assertCompletion(a, "/v|", false, "/vars "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
240 |
a -> assertCompletion(a, "/m|", false, "/methods "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
241 |
a -> assertCompletion(a, "/t|", false, "/types "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
242 |
a -> assertClass(a, "class cTest {}", "class", "cTest"), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
243 |
a -> assertMethod(a, "int mTest() { return 0; }", "()I", "mTest"), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
244 |
a -> assertVariable(a, "int", "fTest"), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
245 |
a -> assertCompletion(a, "/vars |", false, "-all", "-start ", "3 ", "fTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
246 |
a -> assertCompletion(a, "/meth |", false, "-all", "-start ", "2 ", "mTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
247 |
a -> assertCompletion(a, "/typ |", false, "-all", "-start ", "1 ", "cTest "), |
b36ad5a64e75
8153402: jshell tool: completion provider for /help
rfield
parents:
41635
diff
changeset
|
248 |
a -> assertCompletion(a, "/var f|", false, "fTest ") |
33362 | 249 |
); |
250 |
} |
|
251 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
252 |
@Test |
33362 | 253 |
public void testOpen() throws IOException { |
254 |
Compiler compiler = new Compiler(); |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
255 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
256 |
a -> assertCompletion(a, "/o|", false, "/open ") |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
257 |
); |
33362 | 258 |
List<String> p1 = listFiles(Paths.get("")); |
42415
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
259 |
getRootDirectories().forEach(s -> p1.add(s.toString())); |
33362 | 260 |
Collections.sort(p1); |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
261 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
262 |
a -> assertCompletion(a, "/open |", false, p1.toArray(new String[p1.size()])) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
263 |
); |
33362 | 264 |
Path classDir = compiler.getClassDir(); |
265 |
List<String> p2 = listFiles(classDir); |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
266 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
267 |
a -> assertCompletion(a, "/open " + classDir + "/|", false, p2.toArray(new String[p2.size()])) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
268 |
); |
33362 | 269 |
} |
270 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
271 |
@Test |
33362 | 272 |
public void testSave() throws IOException { |
273 |
Compiler compiler = new Compiler(); |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
274 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
275 |
a -> assertCompletion(a, "/s|", false, "/save ", "/set ") |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
276 |
); |
33362 | 277 |
List<String> p1 = listFiles(Paths.get("")); |
38520
17e72b872ffd
8157185: jshell tool: ambiguous format -- distinguished arguments should be options
rfield
parents:
38514
diff
changeset
|
278 |
Collections.addAll(p1, "-all ", "-history ", "-start "); |
42415
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
279 |
getRootDirectories().forEach(s -> p1.add(s.toString())); |
33362 | 280 |
Collections.sort(p1); |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
281 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
282 |
a -> assertCompletion(a, "/save |", false, p1.toArray(new String[p1.size()])) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
283 |
); |
33362 | 284 |
Path classDir = compiler.getClassDir(); |
285 |
List<String> p2 = listFiles(classDir); |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
286 |
testNoStartUp( |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
287 |
a -> assertCompletion(a, "/save " + classDir + "/|", |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
288 |
false, p2.toArray(new String[p2.size()])), |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
289 |
a -> assertCompletion(a, "/save -all " + classDir + "/|", |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
290 |
false, p2.toArray(new String[p2.size()])) |
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
291 |
); |
33362 | 292 |
} |
293 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
294 |
@Test |
33362 | 295 |
public void testClassPath() throws IOException { |
296 |
Compiler compiler = new Compiler(); |
|
297 |
Path outDir = compiler.getPath("testClasspathCompletion"); |
|
298 |
Files.createDirectories(outDir); |
|
299 |
Files.createDirectories(outDir.resolve("dir")); |
|
300 |
createIfNeeded(outDir.resolve("test.jar")); |
|
301 |
createIfNeeded(outDir.resolve("test.zip")); |
|
302 |
compiler.compile(outDir, "package pkg; public class A { public String toString() { return \"A\"; } }"); |
|
303 |
String jarName = "test.jar"; |
|
304 |
compiler.jar(outDir, jarName, "pkg/A.class"); |
|
305 |
compiler.getPath(outDir).resolve(jarName); |
|
306 |
List<String> paths = listFiles(outDir, CLASSPATH_FILTER); |
|
43038 | 307 |
String[] pathArray = paths.toArray(new String[paths.size()]); |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
308 |
testNoStartUp( |
43038 | 309 |
a -> assertCompletion(a, "/env -class-path " + outDir + "/|", false, pathArray), |
310 |
a -> assertCompletion(a, "/env --class-path " + outDir + "/|", false, pathArray), |
|
311 |
a -> assertCompletion(a, "/env -clas " + outDir + "/|", false, pathArray), |
|
312 |
a -> assertCompletion(a, "/env --class-p " + outDir + "/|", false, pathArray), |
|
313 |
a -> assertCompletion(a, "/env --module-path . --class-p " + outDir + "/|", false, pathArray) |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
314 |
); |
33362 | 315 |
} |
316 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
317 |
@Test |
33362 | 318 |
public void testUserHome() throws IOException { |
319 |
List<String> completions; |
|
320 |
Path home = Paths.get(System.getProperty("user.home")); |
|
321 |
try (Stream<Path> content = Files.list(home)) { |
|
322 |
completions = content.filter(CLASSPATH_FILTER) |
|
323 |
.map(file -> file.getFileName().toString() + (Files.isDirectory(file) ? "/" : "")) |
|
324 |
.sorted() |
|
325 |
.collect(Collectors.toList()); |
|
326 |
} |
|
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
327 |
testNoStartUp( |
43038 | 328 |
a -> assertCompletion(a, "/env --class-path ~/|", false, completions.toArray(new String[completions.size()])) |
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
329 |
); |
33362 | 330 |
} |
331 |
||
42843
a8d83044a192
8170162: jshell tool: no mechanism to programmatically launch
rfield
parents:
42415
diff
changeset
|
332 |
@Test |
40765
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
333 |
public void testSet() throws IOException { |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
334 |
List<String> p1 = listFiles(Paths.get("")); |
42415
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
335 |
getRootDirectories().forEach(s -> p1.add(s.toString())); |
40765
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
336 |
Collections.sort(p1); |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
337 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
338 |
String[] modes = {"concise ", "normal ", "silent ", "verbose "}; |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
339 |
String[] options = {"-command", "-delete", "-quiet"}; |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
340 |
String[] modesWithOptions = Stream.concat(Arrays.stream(options), Arrays.stream(modes)).sorted().toArray(String[]::new); |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
341 |
test(false, new String[] {"--no-startup"}, |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
342 |
a -> assertCompletion(a, "/se|", false, "/set "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
343 |
a -> assertCompletion(a, "/set |", false, "editor ", "feedback ", "format ", "mode ", "prompt ", "start ", "truncation "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
344 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
345 |
// /set editor |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
346 |
a -> assertCompletion(a, "/set e|", false, "editor "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
347 |
a -> assertCompletion(a, "/set editor |", false, p1.toArray(new String[p1.size()])), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
348 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
349 |
// /set feedback |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
350 |
a -> assertCompletion(a, "/set fe|", false, "feedback "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
351 |
a -> assertCompletion(a, "/set fe |", false, modes), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
352 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
353 |
// /set format |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
354 |
a -> assertCompletion(a, "/set fo|", false, "format "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
355 |
a -> assertCompletion(a, "/set fo |", false, modes), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
356 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
357 |
// /set mode |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
358 |
a -> assertCompletion(a, "/set mo|", false, "mode "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
359 |
a -> assertCompletion(a, "/set mo |", false), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
360 |
a -> assertCompletion(a, "/set mo newmode |", false, modesWithOptions), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
361 |
a -> assertCompletion(a, "/set mo newmode -|", false, options), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
362 |
a -> assertCompletion(a, "/set mo newmode -command |", false), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
363 |
a -> assertCompletion(a, "/set mo newmode normal |", false, options), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
364 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
365 |
// /set prompt |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
366 |
a -> assertCompletion(a, "/set pro|", false, "prompt "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
367 |
a -> assertCompletion(a, "/set pro |", false, modes), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
368 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
369 |
// /set start |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
370 |
a -> assertCompletion(a, "/set st|", false, "start "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
371 |
a -> assertCompletion(a, "/set st |", false, p1.toArray(new String[p1.size()])), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
372 |
|
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
373 |
// /set truncation |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
374 |
a -> assertCompletion(a, "/set tr|", false, "truncation "), |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
375 |
a -> assertCompletion(a, "/set tr |", false, modes) |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
376 |
); |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
377 |
} |
6f9556cf4404
8164825: jshell tool: Completion for subcommand
shinyafox
parents:
40588
diff
changeset
|
378 |
|
33362 | 379 |
private void createIfNeeded(Path file) throws IOException { |
380 |
if (!Files.exists(file)) |
|
381 |
Files.createFile(file); |
|
382 |
} |
|
383 |
private List<String> listFiles(Path path) throws IOException { |
|
384 |
return listFiles(path, ACCEPT_ALL); |
|
385 |
} |
|
386 |
||
387 |
private List<String> listFiles(Path path, Predicate<? super Path> filter) throws IOException { |
|
388 |
try (Stream<Path> stream = Files.list(path)) { |
|
389 |
return stream.filter(filter) |
|
390 |
.map(p -> p.getFileName().toString() + (Files.isDirectory(p) ? "/" : "")) |
|
391 |
.sorted() |
|
392 |
.collect(Collectors.toList()); |
|
393 |
} |
|
394 |
} |
|
395 |
||
396 |
private static final Predicate<? super Path> ACCEPT_ALL = |
|
397 |
(file) -> !file.endsWith(".") && !file.endsWith(".."); |
|
398 |
||
399 |
private static final Predicate<? super Path> CLASSPATH_FILTER = |
|
400 |
(file) -> ACCEPT_ALL.test(file) && |
|
401 |
(Files.isDirectory(file) || |
|
402 |
file.getFileName().toString().endsWith(".jar") || |
|
403 |
file.getFileName().toString().endsWith(".zip")); |
|
42415
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
404 |
|
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
405 |
private static Iterable<? extends Path> getRootDirectories() { |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
406 |
return StreamSupport.stream(FileSystems.getDefault() |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
407 |
.getRootDirectories() |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
408 |
.spliterator(), |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
409 |
false) |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
410 |
.filter(p -> Files.exists(p)) |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
411 |
.collect(Collectors.toList()); |
85388bae723d
8165564: langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows
jlahoda
parents:
42265
diff
changeset
|
412 |
} |
33362 | 413 |
} |