Skip to content

Commit 3b74289

Browse files
author
Stefan Steinhauser
committed
feat: Add test for RTRIM and LTRIM functions
Refs: #2256
1 parent b56565d commit 3b74289

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/net/sf/jsqlparser/expression/FunctionTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,15 @@ void testSimpleFunctionIssue2059() throws JSQLParserException {
108108
void testListAggOnOverflow(String sqlStr) throws Exception {
109109
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
110110
}
111+
112+
@ParameterizedTest
113+
@ValueSource(strings = {
114+
"select RTRIM('string')",
115+
"select LTRIM('string')",
116+
"select RTRIM(field) from dual",
117+
"select LTRIM(field) from dual"
118+
})
119+
void testTrimFunctions(String sqlStr) throws JSQLParserException {
120+
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
121+
}
111122
}

0 commit comments

Comments
 (0)