You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/27 18:17:26 UTC

[commons-lang] branch master updated: Fix unstable coverage of CharSequenceUtils tests noticed during merge of PRs 898 and 899 (#901)

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 91d157f74 Fix unstable coverage of CharSequenceUtils tests noticed during merge of PRs 898 and 899 (#901)
91d157f74 is described below

commit 91d157f74e244b6ff3c1b836f0bbe313302110a5
Author: Steve Bosman <st...@opencastsoftware.com>
AuthorDate: Fri May 27 19:17:19 2022 +0100

    Fix unstable coverage of CharSequenceUtils tests noticed during merge of PRs 898 and 899 (#901)
---
 src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
index 9c3a5bec9..979b773b0 100644
--- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
@@ -246,6 +246,10 @@ public class CharSequenceUtilsTest {
         testNewLastIndexOfSingle("apache", "x");
         testNewLastIndexOfSingle("oraoraoraora", "r");
         testNewLastIndexOfSingle("mudamudamudamuda", "d");
+        // There is a route through checkLaterThan1#checkLaterThan1
+        // which only gets touched if there is a two letter (or more) partial match
+        // (in this case "st") earlier in the searched string.
+        testNewLastIndexOfSingle("junk-ststarting", "starting");
 
         final Random random = new Random();
         final StringBuilder seg = new StringBuilder();