This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test case to reproduce issue #256
Issue is caused by SQLDev 23.1, SQLcl 23.3. We cannot fix it in the Arbori code. Therefore the tests are disabled for the time being.
- Loading branch information
1 parent
e077947
commit 419993e
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...ava/com/trivadis/plsql/formatter/settings/tests/issues/Issue_256_linebreak_in_string.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.trivadis.plsql.formatter.settings.tests.issues; | ||
|
||
import com.trivadis.plsql.formatter.settings.ConfiguredTestFormatter; | ||
import org.junit.jupiter.api.Disabled; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInstance; | ||
|
||
import java.io.IOException; | ||
|
||
@TestInstance(TestInstance.Lifecycle.PER_CLASS) | ||
@Disabled("Bug in SQLDev 23.1, SQLcl 23.3") | ||
public class Issue_256_linebreak_in_string extends ConfiguredTestFormatter { | ||
@Test | ||
public void escaped_entity_in_string() throws IOException { | ||
var input = """ | ||
begin | ||
dbms_output.put_line('</'); | ||
end; | ||
/ | ||
"""; | ||
var expected = """ | ||
begin | ||
dbms_output.put_line('</'); | ||
end; | ||
/ | ||
"""; | ||
var actual = getFormatter().format(input); | ||
assertEquals(expected, actual); | ||
} | ||
|
||
@Test | ||
public void semi_slash_in_string() throws IOException { | ||
var input = """ | ||
begin | ||
dbms_output.put_line(';/'); | ||
end; | ||
/ | ||
"""; | ||
var expected = """ | ||
begin | ||
dbms_output.put_line(';/'); | ||
end; | ||
/ | ||
"""; | ||
var actual = getFormatter().format(input); | ||
assertEquals(expected, actual); | ||
} | ||
|
||
} |