ObjFW  Diff

Differences From Artifact [66101ddcf7]:

To Artifact [5a6871bef0]:


169
170
171
172
173
174
175
176
177
178
179




180
181
182
183
184
185
186
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(@"-[queryDictionary]",
	    [URI1.queryDictionary isEqual:
	    [OFDictionary dictionaryWithKeysAndObjects:
	    @"que#ry", @"1", @"f&oo", @"b=ar", 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
292
293
294
295
296





297
298
299
300
301
302
303
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(@"-[setQueryDictionary:]",
	    (mutableURI.queryDictionary =
	    [OFDictionary dictionaryWithKeysAndObjects:
	    @"foo&bar", @"baz=qux", @"f=oobar", @"b&azqux", nil]) &&
	    [mutableURI.percentEncodedQuery isEqual:
	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:]",