Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 772d7c2

Browse files
updated test case for Java source (keep quoted identifiers = strings)
1 parent 0a4faad commit 772d7c2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

standalone/src/test/java/com/trivadis/plsql/formatter/settings/tests/rules/I11_enforce_nonquoted_identifiers.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public void skip_java_strings() {
202202
// works only with "setOption(getFormatter().formatWhenSyntaxError, true);"
203203
// setting this option to false will most probably break the Java code to be formatted.
204204
// it's a good example that with syntax errors must not be formatted.
205+
// SQLcl 23.4.0 can parse Java source without errors, we have to ignore the code in the Arbori program.
205206
var input = """
206207
create or replace and resolve java source named "Welcome" as
207208
public class Welcome {
@@ -213,13 +214,12 @@ public static String greet(String name) {
213214
214215
create or replace function greet(in_name in varchar2) return varchar2
215216
as language java
216-
name 'Welcome.greet(java.lang.String) return java.lang.String';
217+
name 'Welcome.greet(java.lang.String) return java.lang.String';
217218
/
218219
219220
select greet('Scott') from dual;
220221
""";
221-
SyntaxError thrown = Assertions.assertThrows (SyntaxError.class, () -> getFormatter().format(input), "Expected syntax error.");
222-
Assertions.assertTrue(thrown.getMessage().contains("Syntax Error at line 4, column 23"));
222+
formatAndAssert(input);
223223
}
224224
}
225225

0 commit comments

Comments
 (0)