[libcxx-commits] [libcxx] r370109 - [libc++] Add yet another test for inverted character classes

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 27 13:39:10 PDT 2019


Author: ldionne
Date: Tue Aug 27 13:39:10 2019
New Revision: 370109

URL: http://llvm.org/viewvc/llvm-project?rev=370109&view=rev
Log:
[libc++] Add yet another test for inverted character classes

This was reported as part of a bug report that ended up being a
duplicate for r340609, but I'm adding the test case since it's
ever so slightly different from what we had before.

Modified:
    libcxx/trunk/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp

Modified: libcxx/trunk/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp?rev=370109&r1=370108&r2=370109&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp Tue Aug 27 13:39:10 2019
@@ -53,5 +53,8 @@ int main(int, char**) {
     assert(!std::regex_match("abZcd", std::regex("^ab\\dcd")));
     assert(!std::regex_match("ab5cd", std::regex("^ab\\Dcd")));
 
+    assert(std::regex_match("_xyz_", std::regex("_(\\s|\\S)+_")));
+    assert(std::regex_match("_xyz_", std::regex("_[\\s\\S]+_")));
+
     return 0;
 }




More information about the libcxx-commits mailing list