Index: ext/fts1/fts1.c ================================================================== --- ext/fts1/fts1.c +++ ext/fts1/fts1.c @@ -2389,10 +2389,11 @@ iStart = tailOffset; wantEllipsis = 0; tailEllipsis = 0; } if( iCol!=tailCol || iStart!=tailOffset ){ + trimWhiteSpace(&sb); appendWhiteSpace(&sb); } if( wantEllipsis || tailEllipsis ){ append(&sb, zEllipsis); appendWhiteSpace(&sb); Index: test/fts1c.test ================================================================== --- test/fts1c.test +++ test/fts1c.test @@ -9,11 +9,11 @@ # #************************************************************************* # This file implements regression tests for SQLite library. The # focus of this script is testing the FTS1 module. # -# $Id: fts1c.test,v 1.8 2006/09/28 18:37:16 drh Exp $ +# $Id: fts1c.test,v 1.9 2006/09/28 18:58:00 drh Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -1155,7 +1155,34 @@ execsql { SELECT snippet(email,'<<<','>>>',' ') FROM email WHERE email MATCH 'first things' } } {{Re: <<>> Polish Deal! Congrats! <<>> seem to be building rapidly now on the }} +do_test fts1c-4.6 { + execsql { + SELECT snippet(email) FROM email + WHERE email MATCH 'chris is here' + } +} {{chris.germany@enron.com Sounds good to me. I bet this is next to the Warick?? Hotel. ... place.? What do you think about going here Christmas +eve?? They have an 11:00 a.m. ...}} +do_test fts1c-4.7 { + execsql { + SELECT snippet(email) FROM email + WHERE email MATCH '"pursuant to"' + } +} {{Erin: + +Pursuant to your request, attached are the Schedule to ...}} +do_test fts1c-4.8 { + execsql { + SELECT snippet(email) FROM email + WHERE email MATCH 'ancillary load davis' + } +} {{pete.davis@enron.com Start Date: 4/22/01; HourAhead hour: 3; No ancillary schedules awarded. +Variances detected. +Variances detected in Load schedule. + + LOG MESSAGES: + +PARSING ...}} finish_test