Index: modules/search/search.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.test,v
retrieving revision 1.1
diff -u -F^f -r1.1 search.test
--- modules/search/search.test	20 Apr 2008 18:23:29 -0000	1.1
+++ modules/search/search.test	10 May 2008 21:30:17 -0000
@@ -160,3 +160,49 @@
     $this->assertEqual(!count($scores) || (min($scores) > 0.0 && max($scores) <= 1.0001), TRUE, "Query scoring '$query'");
   }
 }
+
+class SearchSimplifyTestCase extends DrupalWebTestCase {
+  /**
+   * Implementation of getInfo().
+   */
+  function getInfo() {
+    return array(
+      'name' => t('Text processing'),
+      'description' => t('Tests the test processing done by search_simplify.'),
+      'group' => t('Search'),
+    );
+  }
+
+  /**
+   * Implementation setUp().
+   */
+  function setUp() {
+    parent::setUp('search');
+  }
+  
+  /**
+   * Test that different strings are simplified as expected in the search_simplify function
+   */
+  function testSearchSimplify() {
+    $strings = array(
+      '10102008' => '10-10-2008',
+      '10102008' => '10/10/2008',
+      '10102008' => '10.10.2008',
+      'sentence end' => 'sentence. end',
+      'sentence endno space' => 'sentence end.no space',
+      ' curly braces ' => '{curly braces}',
+      'exclamation ' => 'exclamation!!!',
+      'piped chars' => 'piped|chars',
+      'string lowercase test' => 'String LOWERCASE tEst',
+      'wwwdrupalorg' => 'www.drupal.org',
+      'lowcost' => 'low-cost',
+      'acme' => 'A.C.M.E.',
+      'functionname ' => 'function_name()',
+      ' special quotes ' => '“special quotes”',
+    );
+    
+    foreach ($strings as $expected => $initial) {
+      $this->assertEqual($expected, search_simplify($initial), t("String \"!initial\" becomes \"!simplified\", expected \"!expected\".", array('!initial' => $initial, '!simplified' => search_simplify($initial), '!expected' => $expected)));
+    }
+  }
+}  
\ No newline at end of file
