@@ -86,10 +86,7 @@ public void splitSqlScriptDelimitedWithNewLineButDefaultDelimiterSpecified() {
86
86
statements .get (0 ));
87
87
}
88
88
89
- /**
90
- * See <a href="https://jira.spring.io/browse/SPR-13218">SPR-13218</a>
91
- */
92
- @ Test
89
+ @ Test // SPR-13218
93
90
public void splitScriptWithSingleQuotesNestedInsideDoubleQuotes () throws Exception {
94
91
String statement1 = "select '1' as \" Dogbert's owner's\" from dual" ;
95
92
String statement2 = "select '2' as \" Dilbert's\" from dual" ;
@@ -102,10 +99,7 @@ public void splitScriptWithSingleQuotesNestedInsideDoubleQuotes() throws Excepti
102
99
assertEquals ("statement 2 not split correctly" , statement2 , statements .get (1 ));
103
100
}
104
101
105
- /**
106
- * See <a href="https://jira.spring.io/browse/SPR-11560">SPR-11560</a>
107
- */
108
- @ Test
102
+ @ Test // SPR-11560
109
103
public void readAndSplitScriptWithMultipleNewlinesAsSeparator () throws Exception {
110
104
String script = readScript ("db-test-data-multi-newline.sql" );
111
105
List <String > statements = new ArrayList <>();
@@ -138,10 +132,7 @@ public void readAndSplitScriptContainingComments() throws Exception {
138
132
assertEquals ("statement 4 not split correctly" , statement4 , statements .get (3 ));
139
133
}
140
134
141
- /**
142
- * See <a href="https://jira.spring.io/browse/SPR-10330">SPR-10330</a>
143
- */
144
- @ Test
135
+ @ Test // SPR-10330
145
136
public void readAndSplitScriptContainingCommentsWithLeadingTabs () throws Exception {
146
137
String script = readScript ("test-data-with-comments-and-leading-tabs.sql" );
147
138
List <String > statements = new ArrayList <>();
@@ -157,10 +148,7 @@ public void readAndSplitScriptContainingCommentsWithLeadingTabs() throws Excepti
157
148
assertEquals ("statement 3 not split correctly" , statement3 , statements .get (2 ));
158
149
}
159
150
160
- /**
161
- * See <a href="https://jira.spring.io/browse/SPR-9531">SPR-9531</a>
162
- */
163
- @ Test
151
+ @ Test // SPR-9531
164
152
public void readAndSplitScriptContainingMuliLineComments () throws Exception {
165
153
String script = readScript ("test-data-with-multi-line-comments.sql" );
166
154
List <String > statements = new ArrayList <>();
@@ -176,10 +164,12 @@ public void readAndSplitScriptContainingMuliLineComments() throws Exception {
176
164
177
165
@ Test
178
166
public void containsDelimiters () {
179
- assertTrue ("test with ';' is wrong" , !containsSqlScriptDelimiters ("select 1\n select ';'" , ";" ));
180
- assertTrue ("test with delimiter ; is wrong" , containsSqlScriptDelimiters ("select 1; select 2" , ";" ));
181
- assertTrue ("test with '\\ n' is wrong" , !containsSqlScriptDelimiters ("select 1; select '\\ n\n ';" , "\n " ));
182
- assertTrue ("test with delimiter \\ n is wrong" , containsSqlScriptDelimiters ("select 1\n select 2" , "\n " ));
167
+ assertFalse (containsSqlScriptDelimiters ("select 1\n select ';'" , ";" ));
168
+ assertTrue (containsSqlScriptDelimiters ("select 1; select 2" , ";" ));
169
+ assertFalse (containsSqlScriptDelimiters ("select 1; select '\\ n\n ';" , "\n " ));
170
+ assertTrue (containsSqlScriptDelimiters ("select 1\n select 2" , "\n " ));
171
+ assertFalse (containsSqlScriptDelimiters ("select 1\n select 2" , "\n \n " ));
172
+ assertTrue (containsSqlScriptDelimiters ("select 1\n \n select 2" , "\n \n " ));
183
173
}
184
174
185
175
private String readScript (String path ) throws Exception {
0 commit comments