JAVA/CPP: Handle phone number input in RFC3966 with missing "tel:" prefix.
Review URL: https://codereview.appspot.com/96510044

git-svn-id: http://libphonenumber.googlecode.com/svn/trunk/cpp/test@664 ee073f10-1060-11df-b6a4-87a95322a99c
diff --git a/phonenumbers/phonenumberutil_test.cc b/phonenumbers/phonenumberutil_test.cc
index 89ef1e2..b5ee703 100644
--- a/phonenumbers/phonenumberutil_test.cc
+++ b/phonenumbers/phonenumberutil_test.cc
@@ -2981,6 +2981,10 @@
             phone_util_.Parse("tel:331-6005;phone-context=+64-3",
                               RegionCode::US(), &test_number));
   EXPECT_EQ(nz_number, test_number);
+  EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
+            phone_util_.Parse("My number is tel:03-331-6005;phone-context=+64",
+                              RegionCode::NZ(), &test_number));
+  EXPECT_EQ(nz_number, test_number);
   // Test parsing RFC3966 format with optional user-defined parameters. The
   // parameters will appear after the context if present.
   EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
@@ -2996,6 +3000,10 @@
             phone_util_.Parse("tel:+64-3-331-6005;isub=12345",
                               RegionCode::US(), &test_number));
   EXPECT_EQ(nz_number, test_number);
+  EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
+            phone_util_.Parse("03-331-6005;phone-context=+64",
+                              RegionCode::NZ(), &test_number));
+  EXPECT_EQ(nz_number, test_number);
   // Testing international prefixes.
   // Should strip country code.
   EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,