Skip to content

[regex]test_CI #130406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

[regex]test_CI #130406

wants to merge 2 commits into from

Conversation

Zhenhang1213
Copy link
Contributor

test_CI

@Zhenhang1213 Zhenhang1213 requested a review from a team as a code owner March 8, 2025 09:26
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Mar 8, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2025

@llvm/pr-subscribers-libcxx

Author: Austin (Zhenhang1213)

Changes

test_CI


Full diff: https://github.com/llvm/llvm-project/pull/130406.diff

1 Files Affected:

  • (modified) libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp (+17)
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
index 4face8ba02bbe..559a2db20ae1a 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -7,6 +7,8 @@
 //===----------------------------------------------------------------------===//
 //
 
+// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+
 // <regex>
 
 // template <class BidirectionalIterator, class Allocator, class charT, class traits>
@@ -669,6 +671,21 @@ int main(int, char**)
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
     }
+    {
+      std::cmatch m;
+      const char s[] = "$_se";
+      assert(std::regex_match(s, m, std::regex("\\$\\_se")));
+      assert(m.size() == 1);
+      assert(!m.prefix().matched);
+      assert(m.prefix().first == s);
+      assert(m.prefix().second == m[0].first);
+      assert(!m.suffix().matched);
+      assert(m.suffix().first == m[0].second);
+      assert(m.suffix().second == s + std::char_traits<char>::length(s));
+      assert(m.length(0) >= 0 && static_cast<size_t>(m.length(0)) == std::char_traits<char>::length(s));
+      assert(m.position(0) == 0);
+      assert(m.str(0) == s);
+    }
 
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
     {

@mordante mordante self-assigned this Mar 8, 2025
@mordante
Copy link
Member

mordante commented Mar 8, 2025

Is this intended to be a PR, it seems part of #129348.

@Zhenhang1213
Copy link
Contributor Author

Is this intended to be a PR, it seems part of #129348.

Not,I only want to test.

@philnik777 philnik777 marked this pull request as draft March 9, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants