On Fri, 3 May 2024 21:59:40 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>>> Ideally, we should have separate tests that make sure that jdk.internal.le 
>>> is the default impl.
>> 
>> We have a test that checks if `System.console()` returns the correct Console 
>> (or null) from the expected module 
>> (`test/jdk/java/io/Console/ModuleSelectionTest.java`)
>> 
>>> We should also test this behaviour (i.e. % interpretation) on 
>>> jdk.internal.io Console impl.
>> 
>> Yeah, that would be helpful.
>
>> We have a test that checks if `System.console()` returns the correct Console 
>> (or null) from the expected module 
>> (`test/jdk/java/io/Console/ModuleSelectionTest.java`)
>>
> 
> Good; then here we should indeed specify `-Djdk.console=jdk.internal.le`. 
> Initially, I suggested an alternative wording (i.e. "default"), but that's 
> inappropriate. After all, the test in question resides in 
> `test/jdk/jdk/internal/jline`. So it only makes sense that it tests that 
> concrete implementation. 
> 
>> Yeah, that would be helpful.
>>
> 
> I filed a bug: https://bugs.openjdk.org/browse/JDK-8331681

Thanks. I've added `-Djdk.console=jdk.internal.le`, and also added a test for 
the `java.base`'s console: `test/jdk/java/io/Console/ConsolePromptTest.java`. I 
can easily remove the latter if this is not a reasonable form. Or I can fix it 
as needed. Please let me know.

Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19081#discussion_r1591228737

Reply via email to