diff --git a/core/modules/search/src/Tests/SearchExcerptTest.php b/core/modules/search/src/Tests/SearchExcerptTest.php
index 9f4a5ad2..558cdea 100644
--- a/core/modules/search/src/Tests/SearchExcerptTest.php
+++ b/core/modules/search/src/Tests/SearchExcerptTest.php
@@ -33,6 +33,8 @@ class SearchExcerptTest extends WebTestBase {
    * up string if no keywords matched the string.
    */
   function testSearchExcerpt() {
+    $start_time = microtime(TRUE);
+
     // Make some text with entities and tags.
     $text = 'The <strong>quick</strong> <a href="#">brown</a> fox &amp; jumps <h2>over</h2> the lazy dog';
     // Note: The search_excerpt() function adds some extra spaces -- not
@@ -72,6 +74,8 @@ function testSearchExcerpt() {
     $text = "<div class=\"field field-name-body field-type-text-with-summary field-label-hidden\"><div class=\"field-items\"><div class=\"field-item even\" property=\"content:encoded\"><p>123456789 HTMLTest +123456789+‘  +‘  +‘  +‘  +12345678      +‘  +‘  +‘   ‘</p>\n</div></div></div> ";
     $result = $this->doSearchExcerpt('HTMLTest', $text);
     $this->assertFalse(empty($result),  'Rendered Multi-byte HTML encodings are not corrupted in search excerpts');
+
+    $this->verbose('Elapsed time: ' . (microtime(TRUE) - $start_time));
   }
 
   /**
@@ -82,6 +86,8 @@ function testSearchExcerpt() {
    * and compares them with strings that contain the original unsimplified word.
    */
   function testSearchExcerptSimplified() {
+    $start_time = microtime(TRUE);
+
     $lorem1 = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero.';
     $lorem2 = 'Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci.';
 
@@ -158,6 +164,14 @@ function testSearchExcerptSimplified() {
     $text = "we always use hypertext markup language to describe things";
     $result = preg_replace('| +|', ' ', $this->doSearchExcerpt('html', $text, 'ex'));
     $this->assertTrue(strpos($result, '<strong>hypertext markup language</strong>') !== FALSE, 'Search excerpt works with preprocess hook, acronym many to one');
+
+    // Test with accents and caps in a longer piece of text with the target
+    // near the end.
+    $text = str_repeat($lorem2, 20) . ' ' . $lorem1;
+    $result = preg_replace('| +|', ' ', $this->doSearchExcerpt('Lìbêró', $text));
+    $this->assertTrue(strpos($result, '<strong>libero</strong>') !== FALSE, 'Search excerpt works with caps and accents in longer text');
+
+    $this->verbose('Elapsed time: ' . (microtime(TRUE) - $start_time));
   }
 
   /**
