You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ma...@apache.org on 2021/08/08 08:08:40 UTC

[zookeeper] branch master updated: ZOOKEEPER-4340: add tab unit test for StringUtils#split

This is an automated email from the ASF dual-hosted git repository.

maoling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 3cdc62c  ZOOKEEPER-4340: add tab unit test for StringUtils#split
3cdc62c is described below

commit 3cdc62c132846a6e5fd06782730a986b3e5ea144
Author: Aditya Patruni <ad...@Adityas-MBP.home>
AuthorDate: Sun Aug 8 16:08:32 2021 +0800

    ZOOKEEPER-4340: add tab unit test for StringUtils#split
    
    Adding a test case to StringUtils to ensure spaces expressed as something other than ' ' are covered.
    
    Author: Aditya Patruni <ad...@Adityas-MBP.home>
    
    Reviewers: maoling <ma...@apache.org>
    
    Closes #1732 from apatruni/apatruni/tests and squashes the following commits:
    
    0b25e6865 [Aditya Patruni] add space after , on line 43
    dc700a9b0 [Aditya Patruni] Fix formatting
    8e686d859 [Aditya Patruni] add tab test
---
 .../src/test/java/org/apache/zookeeper/test/StringUtilTest.java        | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/zookeeper-server/src/test/java/org/apache/zookeeper/test/StringUtilTest.java b/zookeeper-server/src/test/java/org/apache/zookeeper/test/StringUtilTest.java
index 22d804e..35c70e0 100644
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/test/StringUtilTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/test/StringUtilTest.java
@@ -38,6 +38,9 @@ public class StringUtilTest extends ZKTestCase {
 
         final String s3 = "1, , 2";
         assertEquals(Arrays.asList("1", "2"), StringUtils.split(s3, ","));
+
+        final String s4 = "1, \t , 2";
+        assertEquals(Arrays.asList("1", "2"), StringUtils.split(s4, ","));
     }
 
     @Test