summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-01-28 22:22:35 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-01-28 22:22:35 +0000
commit538fec0e59c72a5a8c8f9a6a53fb1ac3334c6ee8 (patch)
tree7ef53ac7756292eed7be32738620548710aa0d38 /libcxx/test
parent7684e6e1c2b424729a6b432b27f17fa2a3382cb4 (diff)
downloadbcm5719-llvm-538fec0e59c72a5a8c8f9a6a53fb1ac3334c6ee8.tar.gz
bcm5719-llvm-538fec0e59c72a5a8c8f9a6a53fb1ac3334c6ee8.zip
Fix for PR22061 by K-ballo
llvm-svn: 227384
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp
index b798969c288..79d4b9a2378 100644
--- a/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp
@@ -17,11 +17,13 @@
#include <cassert>
void
-test()
+test(std::regex_constants::syntax_option_type syntax)
{
std::match_results<const char*> m;
const char s[] = "abcdefghijk";
- assert(std::regex_search(s, m, std::regex("cd((e)fg)hi")));
+ assert(std::regex_search(s, m, std::regex("cd((e)fg)hi|(z)", syntax)));
+
+ assert(m.size() == 4);
assert(m[0].first == s+2);
assert(m[0].second == s+9);
@@ -46,5 +48,6 @@ test()
int main()
{
- test();
+ test(std::regex_constants::ECMAScript);
+ test(std::regex_constants::extended);
}
OpenPOWER on IntegriCloud