[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/indexlib
From:       Luís Pedro Coelho <luis () luispedro ! org>
Date:       2005-10-17 22:08:51
Message-ID: 1129586931.418786.31047.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 471527 by luis_pedro:

This test fails (for now), but it signals a missing feature (handling of numerals).


 M  +13 -0     ifile-test.tcc  


--- branches/KDE/3.5/kdepim/indexlib/ifile-test.tcc #471526:471527
@@ -3,6 +3,7 @@
 
 using namespace ::boost::unit_test;
 namespace ifile_test {
+using indexlib::detail::ifile;
 const char* fname = "ifile-test-delete-me";
 void cleanup() {
 	ifile::remove( fname );
@@ -55,6 +56,17 @@
 	BOOST_CHECK_EQUAL( ifi.search( "two" )->list().size(), 1 );
 }
 
+void numbers() {
+	cleanup();
+	ifile ifi( fname );
+
+	ifi.add( "one 123 123456789 four444 five", "doc" );
+	BOOST_CHECK_EQUAL( ifi.search( "123" )->list().size(), 1 );
+	BOOST_CHECK_EQUAL( ifi.search( "123456789" )->list().size(), 1 );
+	BOOST_CHECK_EQUAL( ifi.search( "four444" )->list().size(), 1 );
+	BOOST_CHECK_EQUAL( ifi.search( "five" )->list().size(), 1 );
+}
+
 void partial() {
 	cleanup();
 	ifile ifi( fname );
@@ -100,6 +112,7 @@
 	test->add( BOOST_TEST_CASE( &simple ) );
 	test->add( BOOST_TEST_CASE( &ndocs ) );
 	test->add( BOOST_TEST_CASE( &space ) );
+	test->add( BOOST_TEST_CASE( &numbers ) );
 	test->add( BOOST_TEST_CASE( &partial ) );
 	test->add( BOOST_TEST_CASE( &several ) );
 	return test;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic