Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@209307 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -608,6 +608,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;
|
||||
|
Reference in New Issue
Block a user