0
0
mirror of https://github.com/vim/vim.git synced 2025-08-24 19:45:50 -04:00
vim/runtime/syntax/testdir/input/java_unfoldment.java
Aliaksei Budavei 7132935413
runtime(java): Manage byte limits for variable-width lookbehind assertions
Raise the byte limits from 80 to 120 for "javaFuncDef" and
"java*CommentTitle"; and support selecting other arbitrary
values with
------------------------------------------------------------
	let g:java_lookbehind_byte_counts = {
		\ 'javaMarkdownCommentTitle': 240,
	\ }
------------------------------------------------------------

for related groups of syntax definitions, referring to their
names with dictionary keys.

Over-80-Byte-Limit Lookbehind Examples:
https://raw.githubusercontent.com/openjdk/jdk/refs/tags/jdk-24%2B36/src/java.base/share/classes/sun/security/x509/NamedX509Key.java [Lines 43 & 44]
https://raw.githubusercontent.com/openjdk/jdk/refs/tags/jdk-24%2B36/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java [Line 154]

closes: #17921

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-08 10:50:19 +02:00

123 lines
1.6 KiB
Java

// VIM_TEST_SETUP setlocal nofoldenable
// VIM_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1
// VIM_TEST_SETUP let g:java_lookbehind_byte_counts = {'javaBlock': -1}
// VIM_TEST_SETUP highlight link javaBlockOtherStart Structure
// VIM_TEST_SETUP highlight link javaBlockStart Todo
@SuppressWarnings({
"""
bespoke
/*
*
*/
/**
*
*/
///
///
///
//
//
//
{
}
"""
})
class UnfoldingTests {
interface Unfoldenable
{
}
static {
new Object() {
{
{
new Object() {{{
new Object() {{{}}};
}}};
}
}
};
switch (0) {
case 0:
case 1: {
break;
}
default: ;
}
}
{ Object bb = ((Object) new byte[]{}); }
{
out: {
do {
if (true)
break out;
} while (false);
}
}
/*\\\*/ {
(new java.util.function.Function<Object, Object>() {
/**
* {@inheritDoc} */
public Object apply(Object o) { return o; };
}).apply(
(new java.util.function.Function<Object, Object>() {
/** {@inheritDoc}
*/
public Object apply(Object o) { return o; };
}));
}
/**
* No operation.
*/
void noOp1() { }
/** No operation. */
void noOp2()
{
}
/** No operation. */
void noOp3() {
}
/** No operation. */
void noOp4() {
/*/\/\/\*/ ; }
/// No operation.
///
///
void noOp5() { }
/// No operation.
void noOp6()
{
}
/// No operation.
void noOp7() {
}
/// No operation.
void noOp8() {
/*/\/\/\*/ ; }
}
/*
* Some note.
* {
* }
*/
/**
* A summary.
* {
* }
*/
/// A summary.
/// {
/// }
//
// {
// }
/* 122|........................................................................................*/ interface Unfoldenable {
}