diff options
author | Louis Dionne <ldionne@apple.com> | 2019-08-27 20:39:10 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-08-27 20:39:10 +0000 |
commit | b5aefed40aba09252dd350897a231c4ec5a4376c (patch) | |
tree | f6a39f84ff10cec89b41a3a70b6ccd82186f843c /libcxx/test | |
parent | 27e66bf710951ec8574a4ecc0770456c794ffef8 (diff) | |
download | bcm5719-llvm-b5aefed40aba09252dd350897a231c4ec5a4376c.tar.gz bcm5719-llvm-b5aefed40aba09252dd350897a231c4ec5a4376c.zip |
[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.
llvm-svn: 370109
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp index 9f3c44a06d2..4b5ed6a5fda 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp @@ -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; } |