Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libc++ / trunk / test / re / re.alg / re.alg.match / ecma.pass.cpp
index 50c5cc6..67df410 100644 (file)
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
 // <regex>
 
 // template <class BidirectionalIterator, class Allocator, class charT, class traits>
@@ -608,6 +610,18 @@ int main()
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
     }
+    {
+        std::cmatch m;
+        const char s[] = "foobar";
+        assert(std::regex_match(s, m, std::regex("[^\\0]*")));
+        assert(m.size() == 1);
+    }
+    {
+        std::cmatch m;
+        const char s[] = "foo\0bar";
+        assert(std::regex_match(s, s+7, m, std::regex("[abfor\\0]*")));
+        assert(m.size() == 1);
+    }
     std::locale::global(std::locale("C"));
     {
         std::cmatch m;