Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/re2/re2/testing/set_test.cc

Issue 10873029: Migrate WebRequestRedirectByRegExAction to use RE2 and roll RE2 to revision 97:401ab4168e8e (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/re2/re2/testing/re2_test.cc ('k') | third_party/re2/util/logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/testing/set_test.cc
diff --git a/third_party/re2/re2/testing/set_test.cc b/third_party/re2/re2/testing/set_test.cc
index 89aed802814a7d7c22cc3c4aea2411e49992a47d..74058a47dd70bacbc23c22bad25a85c8919b36a5 100644
--- a/third_party/re2/re2/testing/set_test.cc
+++ b/third_party/re2/re2/testing/set_test.cc
@@ -69,6 +69,18 @@ TEST(Set, UnanchoredFactored) {
CHECK_EQ(v.size(), 0);
}
+TEST(Set, UnanchoredDollar) {
+ RE2::Set s(RE2::DefaultOptions, RE2::UNANCHORED);
+
+ CHECK_EQ(s.Add("foo$", NULL), 0);
+ CHECK_EQ(s.Compile(), true);
+
+ vector<int> v;
+ CHECK_EQ(s.Match("foo", &v), true);
+ CHECK_EQ(v.size(), 1);
+ CHECK_EQ(v[0], 0);
+}
+
TEST(Set, Anchored) {
RE2::Set s(RE2::DefaultOptions, RE2::ANCHOR_BOTH);
« no previous file with comments | « third_party/re2/re2/testing/re2_test.cc ('k') | third_party/re2/util/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698