Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71977 - in sandbox/tools/auto_index: src test
From: john_at_[hidden]
Date: 2011-05-16 07:20:28


Author: johnmaddock
Date: 2011-05-16 07:20:27 EDT (Mon, 16 May 2011)
New Revision: 71977
URL: http://svn.boost.org/trac/boost/changeset/71977

Log:
Test of ID constraint should use regex_match and not regex_search.
Update tests accordingly and change Jamfile.v2 to match current Trunk.
Text files modified:
   sandbox/tools/auto_index/src/auto_index.cpp | 2 +-
   sandbox/tools/auto_index/test/Jamfile.v2 | 3 ++-
   sandbox/tools/auto_index/test/index.idx | 2 ++
   3 files changed, 5 insertions(+), 2 deletions(-)

Modified: sandbox/tools/auto_index/src/auto_index.cpp
==============================================================================
--- sandbox/tools/auto_index/src/auto_index.cpp (original)
+++ sandbox/tools/auto_index/src/auto_index.cpp 2011-05-16 07:20:27 EDT (Mon, 16 May 2011)
@@ -349,7 +349,7 @@
             //
             std::pair<std::string, std::string> item_index(*pid, i->term);
             if(((no_duplicates == false) || (0 == found_terms.count(item_index)))
- && (i->search_id.empty() || regex_search(*pid, i->search_id)))
+ && (i->search_id.empty() || regex_match(*pid, i->search_id)))
             {
                // We have something to index!
                found_terms.insert(item_index);

Modified: sandbox/tools/auto_index/test/Jamfile.v2
==============================================================================
--- sandbox/tools/auto_index/test/Jamfile.v2 (original)
+++ sandbox/tools/auto_index/test/Jamfile.v2 2011-05-16 07:20:27 EDT (Mon, 16 May 2011)
@@ -10,7 +10,7 @@
 
 path-constant local-boost-root : [ modules.peek : BOOST ] ;
 
-alias line_compare_tool : $(local-boost-root)/tools/quickbook/test//line-compare-tool ;
+alias line_compare_tool : $(local-boost-root)/tools/quickbook/test/src//line-compare-tool ;
 
 rule auto-index-test ( target-name : input-file : output-file ? : options * )
 {
@@ -68,3 +68,4 @@
 
 
 
+

Modified: sandbox/tools/auto_index/test/index.idx
==============================================================================
--- sandbox/tools/auto_index/test/index.idx (original)
+++ sandbox/tools/auto_index/test/index.idx 2011-05-16 07:20:27 EDT (Mon, 16 May 2011)
@@ -18,7 +18,9 @@
 !rewrite-name "(?:A|An|The)\s+(.*)" "\1"
 
 "Constrained Index Term" add_const "boost_typetraits\.reference.*" class_name
+"This term should not appear anywhere because of the ID constraint" strlen "(?!boost_typetraits.background).*" function_name
 
 
 type-traits "" ".*.intro" test_index_1
 type-traits "" ".*.background" test_index_2
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk