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:
parent
26dc0118d4
commit
4897c8869b
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue