Skip to content

Commit

Permalink
ut update
Browse files Browse the repository at this point in the history
Change-Id: I3a450130f27146364dd164be275a211c41b75759
  • Loading branch information
unigof committed Aug 25, 2023
1 parent f4337ee commit 07707de
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions velox/functions/lib/tests/Re2FunctionsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,16 +1057,16 @@ TEST_F(Re2FunctionsTest, regexSpiltAllRegexSequencePattern) {

TEST_F(Re2FunctionsTest, regexSplitAllNonAscii) {
testRe2SplitAll(
// split('中国北京velox测试', '北京')
{"\u4e2d\u56fd\u5317\u4eac\u0076\u0065\u006c\u006f\u0078\u6d4b\u8bd5"},
{"\u5317\u4eac"},
{{{"\u4e2d\u56fd", "\u0076\u0065\u006c\u006f\u0078\u6d4b\u8bd5"}}});
// split('苹果香蕉velox橘子', '香蕉')
{"\u82f9\u679c\u9999\u8549\u0076\u0065\u006c\u006f\u0078\u6a58\u5b50"},
{"\u9999\u8549"},
{{{"\u82f9\u679c", "\u0076\u0065\u006c\u006f\u0078\u6a58\u5b50"}}});

testRe2SplitAll(
// split('中国北京velox测试', 'velox')
{"\u4e2d\u56fd\u5317\u4eac\u0076\u0065\u006c\u006f\u0078\u6d4b\u8bd5"},
// split('苹果香蕉velox橘子', 'velox')
{"\u82f9\u679c\u9999\u8549\u0076\u0065\u006c\u006f\u0078\u6a58\u5b50"},
{"\u0076\u0065\u006c\u006f\u0078"},
{{{"\u4e2d\u56fd\u5317\u4eac", "\u6d4b\u8bd5"}}});
{{{"\u82f9\u679c\u9999\u8549", "\u6a58\u5b50"}}});

testRe2SplitAll(
// split('测试velox', 'velox')
Expand All @@ -1085,6 +1085,18 @@ TEST_F(Re2FunctionsTest, regexSplitAllNonAscii) {
{"\u0076\u0065\u006c\u006f\u0078\u6d4b\u8bd5"},
{"\u6d4b\u8bd5"},
{{{"velox", ""}}});

testRe2SplitAll(
// split('苹果香蕉velox橘子 ', 'velox')
{"苹果香蕉velox橘子 "},
{"velox"},
{{{"苹果香蕉", "橘子 "}}});

testRe2SplitAll(
// split('苹果香蕉velox橘子 ', '橘子')
{"苹果香蕉velox橘子 "},
{"velox"},
{{{"苹果香蕉velox", " "}}});
}

} // namespace
Expand Down

0 comments on commit 07707de

Please sign in to comment.