From e41c317348cfe23a78bfd97609c3489c6cc4a786 Mon Sep 17 00:00:00 2001 From: Keith Ito Date: Sun, 21 Mar 2010 14:31:33 -0700 Subject: Advance encodedKeySearchIndex if encodedKey matches a suffix of a parameter. Bug: 2524610 Change-Id: I51bbf8248133b61825d2ae14afe175cb4d0413b8 --- core/tests/coretests/src/android/net/UriTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/tests') diff --git a/core/tests/coretests/src/android/net/UriTest.java b/core/tests/coretests/src/android/net/UriTest.java index ad71fcb..095ee13 100644 --- a/core/tests/coretests/src/android/net/UriTest.java +++ b/core/tests/coretests/src/android/net/UriTest.java @@ -574,5 +574,13 @@ public class UriTest extends TestCase { .appendQueryParameter("key", "y z") .build(); assertEquals("y z", uri.getQueryParameter("key")); + + // key is a substring of parameters, but not present + uri = Uri.parse("http://test/").buildUpon() + .appendQueryParameter("akeyb", "a b") + .appendQueryParameter("keya", "c d") + .appendQueryParameter("bkey", "e f") + .build(); + assertNull(uri.getQueryParameter("key")); } } -- cgit v1.1