From 8c4fce697e5e5a155fbe279018bd08f83f9655f7 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 16 May 2011 11:20:27 +0000 Subject: [PATCH] Test of ID constraint should use regex_match and not regex_search. Update tests accordingly and change Jamfile.v2 to match current Trunk. [SVN r71977] --- src/auto_index.cpp | 2 +- test/Jamfile.v2 | 3 ++- test/index.idx | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/auto_index.cpp b/src/auto_index.cpp index d784433..fe42855 100644 --- a/src/auto_index.cpp +++ b/src/auto_index.cpp @@ -349,7 +349,7 @@ void process_node(boost::tiny_xml::element_ptr node, node_id* prev, title_info* // std::pair 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); diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index bc46a84..523a161 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -10,7 +10,7 @@ import type ; 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 @@ auto-index-test test3 : type_traits.docbook : : --internal-index index-type=inde + diff --git a/test/index.idx b/test/index.idx index fc56f44..52507c2 100644 --- a/test/index.idx +++ b/test/index.idx @@ -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 +