Apply patches from #5462.

Add new test case to verify patches are actually working and prevent future breakage!
Fixes #5462.

[SVN r71240]
This commit is contained in:
John Maddock
2011-04-14 07:53:28 +00:00
parent 3ce59d3bbd
commit 337f7036df
6 changed files with 89 additions and 7 deletions

View File

@ -174,6 +174,18 @@ test-suite regex
: # requirements
<define>BOOST_REGEX_RECURSIVE=1
: regex_regress_recursive ]
[ run regress/$(R_SOURCE) ./noeh_test//boost_regex_noeh
../build//icu_options
: # command line
: # input files
: # requirements
<define>BOOST_NO_EXCEPTIONS=1
<exception-handling>off
<link>static
<runtime-link>shared
: regex_regress_noeh ]
;
build-project ../example ;

50
test/noeh_test/Jamfile.v2 Normal file
View File

@ -0,0 +1,50 @@
# copyright John Maddock 2011
# 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.
project
: requirements
<threading>multi
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>msvc-7.1:<define>TEST_MFC=1
<toolset>msvc-7.0:<define>TEST_MFC=1
<toolset>msvc:<asynch-exceptions>on
# There are unidentified linker problems on these platforms:
<toolset>mipspro-7.4:<link>static
<toolset>sun-5.9:<link>static
<warnings>all
<toolset>gcc:<cxxflags>-Wextra
<toolset>gcc:<cxxflags>-Wshadow
<define>U_USING_ICU_NAMESPACE=0
#<toolset>gcc-mw:<link>static
#<toolset>gcc-mingw:<link>static
<toolset>gcc-cygwin:<link>static
;
lib boost_regex_noeh :
../../src/c_regex_traits.cpp
../../src/cpp_regex_traits.cpp
../../src/cregex.cpp
../../src/fileiter.cpp
../../src/icu.cpp
../../src/instances.cpp
../../src/posix_api.cpp
../../src/regex.cpp
../../src/regex_debug.cpp
../../src/regex_raw_buffer.cpp
../../src/regex_traits_defaults.cpp
../../src/static_mutex.cpp
../../src/w32_regex_traits.cpp
../../src/wc_regex_traits.cpp
../../src/wide_posix_api.cpp
../../src/winstances.cpp
../../src/usinstances.cpp
../../build//icu_options
:
<link>static
<define>BOOST_NO_EXCEPTIONS=1
<exception-handling>off
:
;

View File

@ -208,4 +208,16 @@ void test(const wchar_t& c, const test_invalid_regex_tag& tag)
}
#endif
#ifdef BOOST_NO_EXCETIONS
namespace boost{
void throw_exception( std::exception const & e )
{
std::cerr << e.what() << std::endl;
std::exit(1);
}
}
#endif
#include <boost/test/included/prg_exec_monitor.hpp>