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

Commit

Permalink
add test case to reproduce issue #256
Browse files Browse the repository at this point in the history
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
PhilippSalvisberg committed Dec 9, 2023
1 parent e077947 commit 419993e
Showing 1 changed file with 49 additions and 0 deletions.
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);
}

}

0 comments on commit 419993e

Please sign in to comment.