BenJFan commented on code in PR #1761:
URL:
https://github.com/apache/incubator-seatunnel/pull/1761#discussion_r860505628
##########
seatunnel-transforms/seatunnel-transforms-flink/seatunnel-transform-flink-replace/src/test/java/org/apache/seatunnel/flink/transform/TestReplace.java:
##########
@@ -0,0 +1,48 @@
+package org.apache.seatunnel.flink.transform;
+
+
+import junit.framework.Assert;
+import org.junit.Test;
+
+public class TestReplace {
+
+ /**
+ * Replace the string that the first regular expression matches
+ * Input : Tom's phone number is 123456789 , he's age is 24
+ * Output : Tom's phone number is * , he's age is 24
+ */
+ @Test
+ public void testExample01() {
+ String input = "Tom's phone number is 123456789 , he's age is 24";
+ String output = "Tom's phone number is * , he's age is 24";
+ Assert.assertEquals("期望输出值和实际输出值不一致", output, new
ScalarReplace("\\d+", "*", true, true).eval(input));
Review Comment:
Please use English in your code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]