summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--porterstemmer.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/porterstemmer.test b/porterstemmer.test
index ce0b6d5..b814ac6 100644
--- a/porterstemmer.test
+++ b/porterstemmer.test
@@ -749,7 +749,12 @@ class PorterStemmerInternalsUnitTest extends DrupalWebTestCase {
$this->assertEqual($result1['where'], 2, 'Found match 1 in right place', 'Excerpt');
$this->assertEqual($result1['keyword'], 'walked', 'Found right keyword for match 1', 'Excerpt');
- // Test with upper-case match.
+ // Test with upper-case in the keyword.
+ $result1b = porterstemmer_sbp_excerpt_match('waLk', $text, $offset, $boundary);
+ $this->assertEqual($result1b['where'], 2, 'Found match 1b in right place', 'Excerpt');
+ $this->assertEqual($result1b['keyword'], 'walked', 'Found right keyword for match 1b', 'Excerpt');
+
+ // Test with upper-case in the text.
$offset = 12;
$result2 = porterstemmer_sbp_excerpt_match($key, $text, $offset, $boundary);
$this->assertEqual($result2['where'], 22, 'Found match 2 in right place', 'Excerpt');
@@ -762,6 +767,7 @@ class PorterStemmerInternalsUnitTest extends DrupalWebTestCase {
$this->assertEqual($result3['where'], 22, 'Found match 3 in right place', 'Excerpt');
$this->assertEqual($result3['keyword'], 'walk', 'Found right keyword for match 3', 'Excerpt');
+
}
}