This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
standalone/src/test/java/com/trivadis/plsql/formatter/settings/tests/issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .trivadis .plsql .formatter .settings .tests .issues ;
2+
3+ import com .trivadis .plsql .formatter .settings .ConfiguredTestFormatter ;
4+ import org .junit .jupiter .api .Disabled ;
5+ import org .junit .jupiter .api .Test ;
6+ import org .junit .jupiter .api .TestInstance ;
7+
8+ import java .io .IOException ;
9+
10+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
11+ @ Disabled ("Bug in SQLDev 23.1, SQLcl 23.3" )
12+ public class Issue_256_linebreak_in_string extends ConfiguredTestFormatter {
13+ @ Test
14+ public void escaped_entity_in_string () throws IOException {
15+ var input = """
16+ begin
17+ dbms_output.put_line('</');
18+ end;
19+ /
20+ """ ;
21+ var expected = """
22+ begin
23+ dbms_output.put_line('</');
24+ end;
25+ /
26+ """ ;
27+ var actual = getFormatter ().format (input );
28+ assertEquals (expected , actual );
29+ }
30+
31+ @ Test
32+ public void semi_slash_in_string () throws IOException {
33+ var input = """
34+ begin
35+ dbms_output.put_line(';/');
36+ end;
37+ /
38+ """ ;
39+ var expected = """
40+ begin
41+ dbms_output.put_line(';/');
42+ end;
43+ /
44+ """ ;
45+ var actual = getFormatter ().format (input );
46+ assertEquals (expected , actual );
47+ }
48+
49+ }
You can’t perform that action at this time.
0 commit comments