diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-31 18:46:30 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-31 18:46:30 +0000 |
commit | 63ed2fe1b2bc6d44310a64050491a5d6ba5a153e (patch) | |
tree | e8f7f656d6e358fcc337927b86340b041a240e4e /libstdc++-v3/testsuite/28_regex/basic_regex | |
parent | 56f24a7070faa10916d29e5d01d0d48261d237f2 (diff) | |
download | gcc-63ed2fe1b2bc6d44310a64050491a5d6ba5a153e.tar.gz |
Fix non-portable std::regex test and test more cases
* testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: Fix
test to not rely on GNU extension (escaped normal characters in POSIX
BRE). Enable tests for other strings which are now supported.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex/basic_regex')
-rw-r--r-- | libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc index 5625653d7f9..758f216b0a9 100644 --- a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc +++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc @@ -1,4 +1,3 @@ -// { dg-options "-std=gnu++11" } // 2012-08-20 Benjamin Kosnik <bkoz@redhat.com> // @@ -31,17 +30,27 @@ test01() // raw string literals - //string_type sre0(R"(\d{3}-\d{3}-\d{4})"); // expected fail + string_type sre0(R"(\d{3}-\d{3}-\d{4})"); - string_type sre1(R"( this\n and new : forms\n )"); + string_type sre1(R"( this + and new : forms + )"); string_type sre2(R"([:num:]{3}-[:num:]{3}-[:num:]{4})"); // 1 - regex_type re(R"( this\n and new : forms\n )", std::regex::basic); + regex_type re0(R"(\d{3}-\d{3}-\d{4})", std::regex::ECMAScript); + + regex_type re1(R"( this + and new : forms + )", std::regex::basic); + + regex_type re2(R"([:num:]{3}-[:num:]{3}-[:num:]{4})", std::regex::basic); // 2 + regex_sanity_check(sre0, std::regex::ECMAScript); regex_sanity_check(sre1); + regex_sanity_check(sre2); } int main() |