Restore Missing awk regex tests. Thanks to dexonsmith for noticing, and proposing...
authorMarshall Clow <mclow.lists@gmail.com>
Thu, 6 Apr 2017 14:32:42 +0000 (14:32 +0000)
committerMarshall Clow <mclow.lists@gmail.com>
Thu, 6 Apr 2017 14:32:42 +0000 (14:32 +0000)
llvm-svn: 299652

libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp

index f866929795db8a72084982de7dc2b3ea380eae48..378bc142abe3c5914e838d1280a13b3d72332b0b 100644 (file)
@@ -26,7 +26,7 @@
 
 int main()
 {
-/*    {
+    {
         std::cmatch m;
         const char s[] = "a";
         assert(std::regex_match(s, m, std::regex("a", std::regex_constants::awk)));
@@ -616,13 +616,12 @@ int main()
         assert(m.size() == 0);
     }
     std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
-*/    {
-    /*
+    {
         std::cmatch m;
         const char s[] = "m";
-        assert(std::regex_match(s, m, std::regex("[a[=M=]z]",
-                                                 std::regex_constants::awk);
-       assert(m.size() == 1);
+        assert(std::regex_match(s, m, 
+                      std::regex("[a[=M=]z]", std::regex_constants::awk)));
+        assert(m.size() == 1);
         assert(!m.prefix().matched);
         assert(m.prefix().first == s);
         assert(m.prefix().second == m[0].first);
@@ -632,8 +631,8 @@ int main()
         assert(m.length(0) == std::char_traits<char>::length(s));
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
-*/    }
-/*    {
+    }
+    {
         std::cmatch m;
         const char s[] = "Ch";
         assert(std::regex_match(s, m, std::regex("[a[.ch.]z]",
@@ -1389,4 +1388,4 @@ int main()
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
     }
-*/}
+}