2003-05-24 11:13:26 +00:00
|
|
|
# copyright John Maddock 2003
|
2006-07-16 17:24:25 +00:00
|
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
|
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
# http://www.boost.org/LICENSE_1_0.txt.
|
2003-05-24 11:13:26 +00:00
|
|
|
|
2001-08-12 11:55:51 +00:00
|
|
|
subproject libs/regex/example ;
|
|
|
|
|
2002-09-17 10:58:25 +00:00
|
|
|
# bring in the rules for testing
|
2003-10-12 11:19:15 +00:00
|
|
|
import testing ;
|
2001-08-16 11:43:22 +00:00
|
|
|
|
2005-01-13 17:06:21 +00:00
|
|
|
#
|
|
|
|
# test for MFC by looking inside VC++ include directories:
|
|
|
|
#
|
|
|
|
if ! $(gMFC_CHECK)
|
|
|
|
{
|
|
|
|
gMFC_CHECK = true ;
|
|
|
|
if $(VS71COMNTOOLS)
|
|
|
|
{
|
|
|
|
VS71COMNTOOLS = $(VS71COMNTOOLS:J=" ") ;
|
|
|
|
if [ GLOB $(VS71COMNTOOLS)..\\..\\VC7\\atlmfc\\include : cstringt.h ]
|
|
|
|
{
|
|
|
|
ECHO MFC/ATL regex wrappers will be tested when building with VC7.1 ;
|
|
|
|
REGEX_MFC_OPTS += "<vc-7_1><*><define>TEST_MFC=1" ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if $(VSCOMNTOOLS)
|
|
|
|
{
|
|
|
|
VSCOMNTOOLS = $(VSCOMNTOOLS:J=" ") ;
|
|
|
|
if [ GLOB $(VSCOMNTOOLS)\\..\\..\\VC7\\atlmfc\\include : cstringt.h ]
|
|
|
|
{
|
|
|
|
ECHO MFC/ATL regex wrappers will be tested when building with VC7 ;
|
|
|
|
REGEX_MFC_OPTS += "<vc7><*><define>TEST_MFC=1" ;
|
2005-06-09 00:52:17 +00:00
|
|
|
REGEX_MFC_OPTS += "<vc7-stlport><*><define>TEST_MFC=1" ;
|
|
|
|
REGEX_MFC_OPTS += "<vc-7_0><*><define>TEST_MFC=1" ;
|
|
|
|
REGEX_MFC_OPTS += "<vc-7_0-stlport><*><define>TEST_MFC=1" ;
|
2005-01-13 17:06:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if $(VS80COMNTOOLS)
|
|
|
|
{
|
|
|
|
VS80COMNTOOLS = $(VS80COMNTOOLS:J=" ") ;
|
|
|
|
if [ GLOB $(VS80COMNTOOLS)..\\..\\VC8\\atlmfc\\include : cstringt.h ]
|
|
|
|
{
|
|
|
|
ECHO MFC/ATL regex wrappers will be tested when building with VC8 ;
|
|
|
|
REGEX_MFC_OPTS += "<vc-8_0><*><define>TEST_MFC=1" ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-05-07 21:33:22 +00:00
|
|
|
rule regex-test-run ( sources + : input * : requirements * )
|
2003-01-11 11:52:19 +00:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
run
|
|
|
|
# sources
|
|
|
|
$(sources)
|
2005-09-03 11:13:28 +00:00
|
|
|
<template>../build/regex-test-options
|
2003-01-11 11:52:19 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
<lib>../build/boost_regex
|
|
|
|
: # additional args
|
|
|
|
$(input)
|
|
|
|
: # test-files
|
|
|
|
: # requirements
|
2003-11-30 13:06:58 +00:00
|
|
|
<threading>multi
|
2005-01-13 17:06:21 +00:00
|
|
|
$(REGEX_MFC_OPTS)
|
2005-05-07 21:33:22 +00:00
|
|
|
$(requirements)
|
2003-01-11 11:52:19 +00:00
|
|
|
: # test name
|
|
|
|
] ;
|
|
|
|
}
|
|
|
|
|
|
|
|
test-suite regex-examples :
|
|
|
|
|
2003-12-07 13:09:44 +00:00
|
|
|
[ regex-test-run timer/regex_timer.cpp <template>../build/msvc-stlport-tricky : $(BOOST_ROOT)/libs/regex/example/timer/input_script.txt ]
|
2005-05-07 21:33:22 +00:00
|
|
|
[ regex-test-run grep/grep.cpp <lib>../../program_options/build/boost_program_options : -n -b $(BOOST_ROOT)/boost/regex.hpp $(BOOST_ROOT)/boost/type_traits.hpp : std::locale-support ]
|
2003-01-11 11:52:19 +00:00
|
|
|
[ regex-test-run snippets/credit_card_example.cpp ]
|
2005-01-13 17:06:21 +00:00
|
|
|
[ regex-test-run snippets/mfc_example.cpp ]
|
|
|
|
[ regex-test-run snippets/icu_example.cpp ]
|
2003-01-12 12:29:49 +00:00
|
|
|
[ regex-test-run snippets/partial_regex_grep.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
|
2003-01-11 11:52:19 +00:00
|
|
|
[ regex-test-run snippets/partial_regex_match.cpp : 1234-5678-8765-4 ]
|
2003-01-12 12:29:49 +00:00
|
|
|
[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
|
|
|
[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
|
|
|
[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
|
|
|
[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
2003-01-11 11:52:19 +00:00
|
|
|
[ regex-test-run snippets/regex_match_example.cpp : -auto ]
|
2003-01-12 12:29:49 +00:00
|
|
|
[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
2003-05-17 11:45:48 +00:00
|
|
|
[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
2003-01-12 12:29:49 +00:00
|
|
|
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
2003-01-11 11:52:19 +00:00
|
|
|
[ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
|
2003-05-17 11:45:48 +00:00
|
|
|
[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
|
2003-05-24 11:13:26 +00:00
|
|
|
[ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ]
|
|
|
|
[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
|
|
|
|
[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
2003-01-11 11:52:19 +00:00
|
|
|
|
2003-12-13 12:28:48 +00:00
|
|
|
[ run
|
2003-12-26 23:26:49 +00:00
|
|
|
# sources
|
2003-12-13 12:28:48 +00:00
|
|
|
snippets/captures_example.cpp
|
|
|
|
<template>../build/regex-options
|
|
|
|
# dependencies
|
|
|
|
<lib>../test/captures/boost_regex_extra
|
|
|
|
: # additional args
|
|
|
|
: # test-files
|
|
|
|
: # requirements
|
|
|
|
<threading>multi
|
|
|
|
<define>BOOST_REGEX_MATCH_EXTRA=1
|
|
|
|
<define>BOOST_REGEX_NO_LIB=1
|
|
|
|
: # test name
|
|
|
|
captures_example
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2003-01-11 11:52:19 +00:00
|
|
|
;
|
2002-09-17 10:58:25 +00:00
|
|
|
|
2003-01-12 12:29:49 +00:00
|
|
|
|
2003-01-21 12:20:20 +00:00
|
|
|
|
2003-05-17 11:45:48 +00:00
|
|
|
|
|
|
|
|
2003-10-12 11:19:15 +00:00
|
|
|
|
2003-12-07 13:09:44 +00:00
|
|
|
|
|
|
|
|
2003-12-13 12:28:48 +00:00
|
|
|
|
|
|
|
|
2006-07-16 17:24:25 +00:00
|
|
|
|