Differences From Artifact [66101ddcf7]:
- File
tests/OFURITests.m
— part of check-in
[f1bf64ca9f]
at
2022-09-28 22:02:50
on branch trunk
— Remove -[OFDictionary URIQueryString]
It duplicates the functionality of -[OFMutableURI setQueryDictionary:]. (user: js, size: 13169) [annotate] [blame] [check-ins using]
To Artifact [5a6871bef0]:
- File
tests/OFURITests.m
— part of check-in
[bd6dd6dd00]
at
2022-09-29 21:53:01
on branch trunk
— OFURI: Make query items an array of pairs
With a dictionary the order is lost and keys cannot exist more than
once. (user: js, size: 13287) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
169 170 171 172 173 174 175 | [[[OFURI URIWithString: @"http://host/foo/"] lastPathComponent] isEqual: @"foo"] && [[[OFURI URIWithString: @"http://host/"] lastPathComponent] isEqual: @"/"] && [URI5.lastPathComponent isEqual: @"foo/bar"]) TEST(@"-[query]", [URI1.query isEqual: @"que#ry=1&f&oo=b=ar"] && URI4.query == nil) | | | | | | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | [[[OFURI URIWithString: @"http://host/foo/"] lastPathComponent] isEqual: @"foo"] && [[[OFURI URIWithString: @"http://host/"] lastPathComponent] isEqual: @"/"] && [URI5.lastPathComponent isEqual: @"foo/bar"]) TEST(@"-[query]", [URI1.query isEqual: @"que#ry=1&f&oo=b=ar"] && URI4.query == nil) TEST(@"-[queryItems]", [URI1.queryItems isEqual: [OFArray arrayWithObjects: [OFPair pairWithFirstObject: @"que#ry" secondObject: @"1"], [OFPair pairWithFirstObject: @"f&oo" secondObject: @"b=ar"], nil]]); TEST(@"-[fragment]", [URI1.fragment isEqual: @"frag#ment"] && URI4.fragment == nil) TEST(@"-[copy]", R(URI4 = [[URI1 copy] autorelease])) TEST(@"-[isEqual:]", [URI1 isEqual: URI4] && ![URI2 isEqual: URI3] && [[OFURI URIWithString: @"HTTP://bar/"] isEqual: URI3]) |
︙ | ︙ | |||
285 286 287 288 289 290 291 | [mutableURI.query isEqual: @"que/ry?#"]) EXPECT_EXCEPTION( @"-[setPercentEncodedQuery:] with invalid characters fails", OFInvalidFormatException, mutableURI.percentEncodedQuery = @"`") | | | | | | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | [mutableURI.query isEqual: @"que/ry?#"]) EXPECT_EXCEPTION( @"-[setPercentEncodedQuery:] with invalid characters fails", OFInvalidFormatException, mutableURI.percentEncodedQuery = @"`") TEST(@"-[setQueryItems:]", (mutableURI.queryItems = [OFArray arrayWithObjects: [OFPair pairWithFirstObject: @"foo&bar" secondObject: @"baz=qux"], [OFPair pairWithFirstObject: @"f=oobar" secondObject: @"b&azqux"], nil]) && [mutableURI.percentEncodedQuery isEqual: @"foo%26bar=baz%3Dqux&f%3Doobar=b%26azqux"]) TEST(@"-[setFragment:]", (mutableURI.fragment = @"frag/ment?#") && [mutableURI.percentEncodedFragment isEqual: @"frag/ment?%23"]) TEST(@"-[setPercentEncodedFragment:]", |
︙ | ︙ |