Compare commits
No commits in common. "2cfc122ebbaea0e1ce7069adf50f6e08f3eb2b39" and "dbc6c52f8898872a8b54a01dfaadef65f8a65035" have entirely different histories.
2cfc122ebb
...
dbc6c52f88
BIN
2016-04-01.tar.gz
Normal file
BIN
2016-04-01.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1,42 +0,0 @@
|
|||||||
From 1e89b6846a1a2597a7e9c4ad23842e6be534b87e Mon Sep 17 00:00:00 2001
|
|
||||||
From: zhouyh <zhouyihang3@h-partners.com>
|
|
||||||
Date: Wed, 14 Dec 2022 18:42:49 +0800
|
|
||||||
Subject: [PATCH] add some testcases for abnormal branches
|
|
||||||
|
|
||||||
---
|
|
||||||
re2/testing/re2_test.cc | 12 ++++++++++++
|
|
||||||
1 file changed, 12 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/re2/testing/re2_test.cc b/re2/testing/re2_test.cc
|
|
||||||
index b1f7d73..51a1739 100644
|
|
||||||
--- a/re2/testing/re2_test.cc
|
|
||||||
+++ b/re2/testing/re2_test.cc
|
|
||||||
@@ -211,6 +211,16 @@ TEST(CheckRewriteString, all) {
|
|
||||||
TestCheckRewriteString("a(b)(c)", "f\\oo\\1", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
+TEST(RE2, Rewrite) {
|
|
||||||
+ RE2 re("(foo)|(bar)baz");
|
|
||||||
+ StringPiece group[4];
|
|
||||||
+ std::string out;
|
|
||||||
+
|
|
||||||
+ ASSERT_FALSE(re.Rewrite(&out, "hello\\5", group, arraysize(group)));
|
|
||||||
+ ASSERT_FALSE(re.Rewrite(&out,"hello\\a", group, arraysize(group)));
|
|
||||||
+ ASSERT_TRUE(re.Rewrite(&out,"hello\\\\", group, arraysize(group)));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
TEST(RE2, Extract) {
|
|
||||||
std::string s;
|
|
||||||
|
|
||||||
@@ -360,6 +370,8 @@ TEST(RE2, Match) {
|
|
||||||
ASSERT_EQ(group[1], "chrisr:9000");
|
|
||||||
ASSERT_EQ(group[2], "chrisr");
|
|
||||||
ASSERT_EQ(group[3], "9000");
|
|
||||||
+ ASSERT_FALSE(
|
|
||||||
+ re.Match(s, 2, 1, RE2::UNANCHORED, group, arraysize(group)));
|
|
||||||
|
|
||||||
std::string all, host;
|
|
||||||
int port;
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
From ba2e7c2f25047a6848f2baa9bc4cb700ea9dda84 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hannah Shi <hannahshisfb@gmail.com>
|
|
||||||
Date: Fri, 3 Jun 2022 17:16:29 -0700
|
|
||||||
Subject: [PATCH] fix 64 to 32 bit clang conversion warning
|
|
||||||
|
|
||||||
Change-Id: I62e86c0e19800e128c2d2fb5f952c9ee7a7b4258
|
|
||||||
Reviewed-on: https://code-review.googlesource.com/c/re2/+/60210
|
|
||||||
Reviewed-by: Perry Lorier <perryl@google.com>
|
|
||||||
Reviewed-by: Paul Wankadia <junyer@google.com>
|
|
||||||
---
|
|
||||||
util/rune.cc | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/util/rune.cc b/util/rune.cc
|
|
||||||
index 4f625ea3..a40e756c 100644
|
|
||||||
--- a/util/rune.cc
|
|
||||||
+++ b/util/rune.cc
|
|
||||||
@@ -51,7 +51,7 @@ int
|
|
||||||
chartorune(Rune *rune, const char *str)
|
|
||||||
{
|
|
||||||
int c, c1, c2, c3;
|
|
||||||
- long l;
|
|
||||||
+ Rune l;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* one character sequence
|
|
||||||
@@ -127,7 +127,7 @@ int
|
|
||||||
runetochar(char *str, const Rune *rune)
|
|
||||||
{
|
|
||||||
/* Runes are signed, so convert to unsigned for range check. */
|
|
||||||
- unsigned long c;
|
|
||||||
+ unsigned int c;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* one character sequence
|
|
||||||
@@ -212,7 +212,7 @@ int
|
|
||||||
utflen(const char *s)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
- long n;
|
|
||||||
+ int n;
|
|
||||||
Rune rune;
|
|
||||||
|
|
||||||
n = 0;
|
|
||||||
@@ -232,7 +232,7 @@ utflen(const char *s)
|
|
||||||
char*
|
|
||||||
utfrune(const char *s, Rune c)
|
|
||||||
{
|
|
||||||
- long c1;
|
|
||||||
+ int c1;
|
|
||||||
Rune r;
|
|
||||||
int n;
|
|
||||||
|
|
||||||
22
re2.spec
22
re2.spec
@ -1,12 +1,10 @@
|
|||||||
Name: re2
|
Name: re2
|
||||||
Version: 20211101
|
Version: 20160401
|
||||||
Release: 3
|
Release: 8
|
||||||
Summary: Provide backtracking RE engine
|
Summary: Provide backtracking RE engine
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://github.com/google/re2/
|
URL: http://github.com/google/re2/
|
||||||
Source0: https://github.com/google/re2/archive/2021-11-01.tar.gz
|
Source0: https://github.com/google/re2/archive/2016-04-01.tar.gz
|
||||||
Patch0: backport-fix-64-to-32-bit-clang-conversion-warning.patch
|
|
||||||
Patch1: add-some-testcases-for-abnormal-branches.patch
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -22,7 +20,7 @@ This package contains C ++ header files and symbolic links to re2's shared libra
|
|||||||
If you want to develop programs using re2, you need to install re2-devel.
|
If you want to develop programs using re2, you need to install re2-devel.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-2021-11-01 -p1
|
%autosetup -n %{name}-2016-04-01 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++11" \
|
%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++11" \
|
||||||
@ -51,17 +49,5 @@ make %{?_smp_mflags} shared-test
|
|||||||
%exclude %{_libdir}/libre2.a
|
%exclude %{_libdir}/libre2.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 14 2022 zhouyihang <zhouyihang3@h-partners.com> - 20211101-3
|
|
||||||
- add some testcases for abnormal branches
|
|
||||||
|
|
||||||
* Mon Oct 24 2022 gaihuiying <eaglegai@163.com> - 20211101-2
|
|
||||||
- fix 64 to 32 bit clang conversion warning
|
|
||||||
|
|
||||||
* Thu Dec 16 2021 yanglu <yanglu72@huawei.com> - 20211101-1
|
|
||||||
- upgrade to 20211101
|
|
||||||
|
|
||||||
* Thu Dec 3 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 20200801-1
|
|
||||||
- upgrade to 20200801
|
|
||||||
|
|
||||||
* Fri Nov 29 2019 fengbing <fengbing7@huawei.com> - 20160401-8
|
* Fri Nov 29 2019 fengbing <fengbing7@huawei.com> - 20160401-8
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user