LANG-1593: Add unit test with OP's use-case that shows unexpected difference in behaviour.

Unit test is set to "@Disabled" to not fail the build.
This commit is contained in:
Gilles Sadowski 2020-08-03 12:24:13 +02:00
parent 26dc0118d4
commit 4897c8869b
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,7 @@ import java.util.regex.PatternSyntaxException;
import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.mutable.MutableInt;
import org.apache.commons.lang3.text.WordUtils; import org.apache.commons.lang3.text.WordUtils;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
/** /**
* Unit tests for methods of {@link org.apache.commons.lang3.StringUtils} * Unit tests for methods of {@link org.apache.commons.lang3.StringUtils}
@ -1341,6 +1342,15 @@ public class StringUtilsTest {
assertEquals("foo2", StringUtils.join(MIXED_TYPE_LIST)); assertEquals("foo2", StringUtils.join(MIXED_TYPE_LIST));
} }
@Disabled
@Test
public void testLang1593() {
final int[] arr = new int[] {1, 2, 3, 4, 5, 6, 7};
final String expected = StringUtils.join(arr, '-');
final String actual = StringUtils.join(arr, "-");
assertEquals(expected, actual);
}
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
@Test @Test
public void testJoin_Objects() { public void testJoin_Objects() {