From 88428ec200d01c0dc7d311eebd6a718035e0016a Mon Sep 17 00:00:00 2001 From: Coldwings Date: Thu, 11 Dec 2025 12:36:27 +0800 Subject: [PATCH 1/3] Since macos-13 test image are retired, move on to macos-15 by github advise --- .github/workflows/ci.macos.arm.yml | 4 ++-- .github/workflows/ci.macos.x86_64.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.macos.arm.yml b/.github/workflows/ci.macos.arm.yml index 453df4ab..dc0883e0 100644 --- a/.github/workflows/ci.macos.arm.yml +++ b/.github/workflows/ci.macos.arm.yml @@ -6,7 +6,7 @@ on: jobs: macOS14-arm: - runs-on: macos-14 + runs-on: macos-15 steps: - uses: szenius/set-timezone@v2.0 @@ -31,7 +31,7 @@ jobs: -D CMAKE_BUILD_TYPE=MinSizeRel \ -D PHOTON_ENABLE_SASL=ON \ -D PHOTON_ENABLE_LIBCURL=ON \ - -D OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@1.1/1.1.1w + -D OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@3/3.6.0 cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) - name: Test diff --git a/.github/workflows/ci.macos.x86_64.yml b/.github/workflows/ci.macos.x86_64.yml index cef9ca16..c244bd42 100644 --- a/.github/workflows/ci.macos.x86_64.yml +++ b/.github/workflows/ci.macos.x86_64.yml @@ -6,7 +6,7 @@ on: jobs: macOS13-x86: - runs-on: macos-13 + runs-on: macos-15 steps: - uses: szenius/set-timezone@v2.0 @@ -31,7 +31,7 @@ jobs: -D CMAKE_BUILD_TYPE=MinSizeRel \ -D PHOTON_ENABLE_SASL=ON \ -D PHOTON_ENABLE_LIBCURL=ON \ - -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 + -D OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@3/3.6.0 cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) - name: Test From c43b4c07ec74039b0bb7a7e30c9605a6896a1f15 Mon Sep 17 00:00:00 2001 From: Coldwings Date: Fri, 12 Dec 2025 15:03:10 +0800 Subject: [PATCH 2/3] FIX: estring split in non-consecutive merge mode (#1071) --- common/estring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/estring.h b/common/estring.h index b654588c..d5b7c32e 100644 --- a/common/estring.h +++ b/common/estring.h @@ -197,7 +197,7 @@ class estring_view : public std::string_view } iterator& operator++() { - _part = _host->find_part(_part.end()); + _part = _host->find_part(_part.end() + 1); return *this; } iterator& operator++(int) From 357d53197e497bc2e9a91fb8c8e1fc063d10ddf3 Mon Sep 17 00:00:00 2001 From: Coldwings Date: Thu, 11 Dec 2025 12:26:59 +0800 Subject: [PATCH 3/3] Fix split iteration meets empty parts --- common/estring.h | 3 ++- common/test/test.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/common/estring.h b/common/estring.h index d5b7c32e..4b89adb4 100644 --- a/common/estring.h +++ b/common/estring.h @@ -208,7 +208,8 @@ class estring_view : public std::string_view } bool operator == (const iterator& rhs) const { - return _part == rhs._part; + return _part.data() == rhs._part.data() && + _part.length() == rhs._part.length(); } bool operator != (const iterator& rhs) const { diff --git a/common/test/test.cpp b/common/test/test.cpp index 50058021..efe14ee7 100644 --- a/common/test/test.cpp +++ b/common/test/test.cpp @@ -863,6 +863,51 @@ TEST(estring, test) EXPECT_EQ(a[1], "q3r1234"); EXPECT_EQ(a[2], "poiu"); + sp = s.split(cs, false); + it = sp.begin(); + front = *it; + remainder = it.remainder(); + LOG_DEBUG(VALUE(front), VALUE(remainder)); + EXPECT_EQ(front, "alskdjf"); + EXPECT_EQ(remainder, ";;,q3r1234;poiu"); + it ++; + front = *it; + remainder = it.remainder(); + LOG_DEBUG(VALUE(front), VALUE(remainder)); + EXPECT_EQ(front, ""); + EXPECT_EQ(remainder, ";,q3r1234;poiu"); + it ++; + front = *it; + remainder = it.remainder(); + LOG_DEBUG(VALUE(front), VALUE(remainder)); + EXPECT_EQ(front, ""); + EXPECT_EQ(remainder, ",q3r1234;poiu"); + it ++; + front = *it; + remainder = it.remainder(); + LOG_DEBUG(VALUE(front), VALUE(remainder)); + EXPECT_EQ(front, ""); + EXPECT_EQ(remainder, "q3r1234;poiu"); + it ++; + front = *it; + remainder = it.remainder(); + LOG_DEBUG(VALUE(front), VALUE(remainder)); + EXPECT_EQ(front, "q3r1234"); + EXPECT_EQ(remainder, "poiu"); + + a.clear(); + for (auto x: sp) + { + a.push_back(x); + LOG_DEBUG(x); + } + + EXPECT_EQ(a.size(), 6); + EXPECT_EQ(a[0], "alskdjf"); + EXPECT_EQ(a[4], "q3r1234"); + EXPECT_EQ(a[5], "poiu"); + + auto sv = s;//.view(); EXPECT_TRUE(sv.starts_with("alskdjf")); EXPECT_FALSE(sv.starts_with("alsk32"));