Tidy up a test.

Change-Id: I0d5bca1b9915fa5485d4b01796a276959788f427
Reviewed-on: https://code-review.googlesource.com/c/re2/+/50410
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/testing/re2_test.cc b/re2/testing/re2_test.cc
index e8165bf..4dba3c6 100644
--- a/re2/testing/re2_test.cc
+++ b/re2/testing/re2_test.cc
@@ -1231,11 +1231,10 @@
 // Suggested by Josh Hyman.  Failed when SearchOnePass was
 // not implementing case-folding.
 TEST(CaseInsensitive, MatchAndConsume) {
-  std::string result;
   std::string text = "A fish named *Wanda*";
   StringPiece sp(text);
-
-  EXPECT_TRUE(RE2::PartialMatch(sp, "(?i)([wand]{5})", &result));
+  StringPiece result;
+  EXPECT_TRUE(RE2::PartialMatch(text, "(?i)([wand]{5})", &result));
   EXPECT_TRUE(RE2::FindAndConsume(&sp, "(?i)([wand]{5})", &result));
 }