ObjFW  Diff

Differences From Artifact [287e2de2cf]:

To Artifact [fc355e1de3]:


285
286
287
288
289
290
291











292
293
294
295
296
297
298

	OTAssertEqualObjects([[OFIRI IRIWithString: @"http://host/"]
	    lastPathComponent],
	    @"/");

	OTAssertEqualObjects(_IRI[4].lastPathComponent, @"foo/bar");
}












- (void)testQuery
{
	OTAssertEqualObjects(_IRI[0].query, @"que#ry=1&f&oo=b=ar");
	OTAssertNil(_IRI[3].query);
	OTAssertEqualObjects(_IRI[8].query, @"query");
	OTAssertEqualObjects(_IRI[9].query, @"query");







>
>
>
>
>
>
>
>
>
>
>







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

	OTAssertEqualObjects([[OFIRI IRIWithString: @"http://host/"]
	    lastPathComponent],
	    @"/");

	OTAssertEqualObjects(_IRI[4].lastPathComponent, @"foo/bar");
}

- (void)testPathExtension
{
	OTAssertEqualObjects(
	    [[OFIRI IRIWithString: @"http://host/path.dir/path.file"]
	    pathExtension], @"file");

	OTAssertEqualObjects(
	    [[OFIRI IRIWithString: @"http://host/path/path.dir/"]
	    pathExtension], @"dir");
}

- (void)testQuery
{
	OTAssertEqualObjects(_IRI[0].query, @"que#ry=1&f&oo=b=ar");
	OTAssertNil(_IRI[3].query);
	OTAssertEqualObjects(_IRI[8].query, @"query");
	OTAssertEqualObjects(_IRI[9].query, @"query");
376
377
378
379
380
381
382


























383
384
385
386
387
388
389
	    [[[OFIRI IRIWithString: @"http://host/"]
	    IRIByDeletingLastPathComponent] path], @"/");

	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host"]
	    IRIByDeletingLastPathComponent] path], @"");
}



























- (void)testIRIByAddingPercentEncodingForUnicodeCharacters
{
	OTAssertEqualObjects(
	    _IRI[10].IRIByAddingPercentEncodingForUnicodeCharacters,
	    [OFIRI IRIWithString: @"http://%C3%A4/%C3%B6?%C3%BC"]);
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
	    [[[OFIRI IRIWithString: @"http://host/"]
	    IRIByDeletingLastPathComponent] path], @"/");

	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host"]
	    IRIByDeletingLastPathComponent] path], @"");
}

- (void)testIRIByAppendingPathExtension
{
	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host/path.dir/path"]
	    IRIByAppendingPathExtension: @"file"] path],
	    @"/path.dir/path.file");

	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host/path/path/"]
	    IRIByAppendingPathExtension: @"dir"] path],
	    @"/path/path.dir/");
}

- (void)testIRIByDeletingPathExtension
{
	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host/path.dir/path.file"]
	    IRIByDeletingPathExtension] path],
	    @"/path.dir/path");

	OTAssertEqualObjects(
	    [[[OFIRI IRIWithString: @"http://host/path/path.dir/"]
	    IRIByDeletingPathExtension] path],
	    @"/path/path/");
}

- (void)testIRIByAddingPercentEncodingForUnicodeCharacters
{
	OTAssertEqualObjects(
	    _IRI[10].IRIByAddingPercentEncodingForUnicodeCharacters,
	    [OFIRI IRIWithString: @"http://%C3%A4/%C3%B6?%C3%BC"]);
}