mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 05:42:15 +02:00
Merge branch 'develop'
This commit is contained in:
@ -68,6 +68,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
|
||||
std::wstring wre(regx.begin(), regx.end());
|
||||
std::wstring wtext(text.begin(), text.end());
|
||||
@ -89,6 +91,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_ICU
|
||||
boost::u32regex ure = boost::make_u32regex(regx);
|
||||
|
@ -230,7 +230,7 @@ int cpp_main(int /*argc*/, char * /*argv*/[])
|
||||
print_cpp_info(wchar_t(0), "wchar_t");
|
||||
#endif
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
boost::c_regex_traits<char> a;
|
||||
print_sort_syntax(a, "boost::c_regex_traits<char>");
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
@ -15,7 +15,7 @@
|
||||
// this lets us compile at warning level 4 without seeing concept-check related warnings
|
||||
# pragma warning(disable:4100)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma option -w-8019 -w-8004 -w-8008
|
||||
#endif
|
||||
#ifdef BOOST_INTEL
|
||||
@ -53,7 +53,7 @@ int main()
|
||||
>();
|
||||
#endif
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
boost::function_requires<
|
||||
boost::BoostRegexConcept<
|
||||
boost::basic_regex<char, boost::c_regex_traits<char> >
|
||||
|
@ -21,7 +21,7 @@
|
||||
// this lets us compile at warning level 4 without seeing concept-check related warnings
|
||||
# pragma warning(disable:4100)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma option -w-8019 -w-8004 -w-8008
|
||||
#endif
|
||||
|
||||
|
@ -106,7 +106,9 @@ void test_named_subexpressions(charT)
|
||||
int cpp_main( int , char* [] )
|
||||
{
|
||||
test_named_subexpressions(char(0));
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
test_named_subexpressions(wchar_t(0));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
// we get unresolved externals from basic_string
|
||||
// unless we do this, a well known Borland bug:
|
||||
#define _RWSTD_COMPILE_INSTANTIATE
|
||||
|
@ -103,7 +103,7 @@ void do_test(const charT& c, const tagT& tag)
|
||||
if(test_locale::cpp_locale_state() != test_locale::no_test)
|
||||
test(e1, tag);
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) && defined(TEST_THREADS)
|
||||
// typeid appears to fail in multithreaded environments:
|
||||
test_info<charT>::set_typename("");
|
||||
|
@ -59,7 +59,7 @@ void test_anchors()
|
||||
//
|
||||
TEST_REGEX_SEARCH("^.", boost::regex::extended, " \n \r\n ", match_default, make_array(0, 1, -2, 3, 4, -2, 7, 8, -2, -2));
|
||||
TEST_REGEX_SEARCH(".$", boost::regex::extended, " \n \r\n ", match_default, make_array(1, 2, -2, 4, 5, -2, 8, 9, -2, -2));
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
TEST_REGEX_SEARCH_W(L"^.", boost::regex::extended, L"\x2028 \x2028", match_default, make_array(0, 1, -2, 1, 2, -2, -2));
|
||||
TEST_REGEX_SEARCH_W(L".$", boost::regex::extended, L" \x2028 \x2028", match_default, make_array(0, 1, -2, 2, 3, -2, 3, 4, -2, -2));
|
||||
#endif
|
||||
|
@ -61,7 +61,7 @@ void test_character_escapes()
|
||||
TEST_REGEX_SEARCH("a\\Q+*?\\\\Eb", perl, "a+*?\\b", match_default, make_array(0, 6, -2, -2));
|
||||
TEST_REGEX_SEARCH("\\C+", perl, "abcde", match_default, make_array(0, 5, -2, -2));
|
||||
TEST_REGEX_SEARCH("\\X+", perl, "abcde", match_default, make_array(0, 5, -2, -2));
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
TEST_REGEX_SEARCH_W(L"\\X", perl, L"a\x0300\x0301", match_default, make_array(0, 3, -2, -2));
|
||||
#endif
|
||||
// unknown escape sequences match themselves:
|
||||
|
@ -188,7 +188,7 @@ void test_en_locale(const char* name, boost::uint32_t lcid)
|
||||
TEST_REGEX_SEARCH_L("[[:graph:]]+", perl, "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe", match_default, make_array(0, 93, -2, -2));
|
||||
TEST_REGEX_SEARCH_L("[[:word:]]+", perl, "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe", match_default, make_array(0, 61, -2, -2));
|
||||
// collation sensitive ranges:
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
|
||||
// these tests are disabled for Borland C++: a bug in std::collate<wchar_t>
|
||||
// causes these tests to crash (pointer overrun in std::collate<wchar_t>::do_transform).
|
||||
TEST_REGEX_SEARCH_L("[a-z]+", perl|::boost::regex_constants::collate, "\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc", match_default, make_array(0, 28, -2, -2));
|
||||
|
@ -276,7 +276,7 @@ void test_tricky_cases3()
|
||||
// posix only:
|
||||
TEST_REGEX_SEARCH("^[[:blank:]]*#([^\\n]*\\\\[[:space:]]+)*[^\\n]*", awk, "#define some_symbol(x) \\ \r\n foo();\\\r\n printf(#x);", match_default, make_array(0, 53, 28, 42, -2, -2));
|
||||
// now try and test some unicode specific characters:
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
|
||||
TEST_REGEX_SEARCH_W(L"[[:unicode:]]+", perl, L"a\x0300\x0400z", match_default, make_array(1, 3, -2, -2));
|
||||
TEST_REGEX_SEARCH_W(L"[\x10-\xff]", perl, L"\x0300\x0400", match_default, make_array(-2, -2));
|
||||
TEST_REGEX_SEARCH_W(L"[\01-\05]{5}", perl, L"\x0300\x0400\x0300\x0400\x0300\x0400", match_default, make_array(-2, -2));
|
||||
|
Reference in New Issue
Block a user