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

Commit 5005135

Browse files
add test cases to reproduce #267
1 parent a21347a commit 5005135

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.trivadis.plsql.formatter.settings.tests.issues;
2+
3+
import com.trivadis.plsql.formatter.settings.ConfiguredTestFormatter;
4+
import org.junit.jupiter.api.Test;
5+
import org.junit.jupiter.api.TestInstance;
6+
7+
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
8+
public class Issue_267_spaces_in_grant extends ConfiguredTestFormatter {
9+
@Test
10+
public void keep_spaces_in_grant_statements() {
11+
var input = """
12+
grant debug connect session to scott;
13+
grant debug any procedure to scott;
14+
grant execute on dbms_debug_jdwp to scott;
15+
""";
16+
formatAndAssert(input);
17+
}
18+
19+
@Test
20+
public void keep_spaces_in_grant_statements_one_token_per_line() {
21+
var input = """
22+
grant
23+
debug
24+
connect
25+
session
26+
to
27+
scott;
28+
29+
grant
30+
debug
31+
any
32+
procedure
33+
to
34+
scott;
35+
36+
grant
37+
execute
38+
on
39+
dbms_debug_jdwp
40+
to
41+
scott;
42+
""";
43+
formatAndAssert(input);
44+
}
45+
}

0 commit comments

Comments
 (0)