ObjFW  Diff

Differences From Artifact [8d7d5918e5]:

To Artifact [7769c4140e]:


265
266
267
268
269
270
271
272
273
274




275
276
277
278
279
280
281
265
266
267
268
269
270
271



272
273
274
275
276
277
278
279
280
281
282







-
-
-
+
+
+
+







	    [[a objectAtIndex: i++] isEqual: @"bar"] &&
	    [[a objectAtIndex: i++] isEqual: @""] &&
	    [[a objectAtIndex: i++] isEqual: @"baz"] &&
	    [[a objectAtIndex: i++] isEqual: @""] &&
	    [[a objectAtIndex: i++] isEqual: @""])

	i = 0;
	TEST(@"-[componentsSeparatedByString:skipEmpty:]",
	    (a = [@"fooXXbarXXXXbazXXXX" componentsSeparatedByString: @"XX"
							   skipEmpty: YES]) &&
	TEST(@"-[componentsSeparatedByString:options:]",
	    (a = [@"fooXXbarXXXXbazXXXX"
	    componentsSeparatedByString: @"XX"
				options: OF_STRING_SKIP_EMPTY]) &&
	    [a count] == 3 &&
	    [[a objectAtIndex: i++] isEqual: @"foo"] &&
	    [[a objectAtIndex: i++] isEqual: @"bar"] &&
	    [[a objectAtIndex: i++] isEqual: @"baz"])

	TEST(@"+[stringWithPath:]",
	    (is = [OFString stringWithPath: @"foo", @"bar", @"baz", nil]) &&
497
498
499
500
501
502
503
504

505
506
507
508

509

510
511
512
513
514
515
516
498
499
500
501
502
503
504

505
506
507
508
509
510

511
512
513
514
515
516
517
518







-
+




+
-
+







				    withString: @"foo"]) &&
	    [s[0] isEqual: @"asd foo asd foofoo asd"] &&
	    (s[0] = [OFMutableString stringWithString: @"XX"]) &&
	    R([s[0] replaceOccurrencesOfString: @"X"
				    withString: @"XX"]) &&
	    [s[0] isEqual: @"XXXX"])

	TEST(@"-[replaceOccurrencesOfString:withString:inRange:]",
	TEST(@"-[replaceOccurrencesOfString:withString:options:range:]",
	    (s[0] = [OFMutableString stringWithString:
	    @"foofoobarfoobarfoo"]) &&
	    R([s[0] replaceOccurrencesOfString: @"oo"
				    withString: @"óò"
				       options: 0
				       inRange: of_range(2, 15)]) &&
					 range: of_range(2, 15)]) &&
	    [s[0] isEqual: @"foofóòbarfóòbarfoo"])

	TEST(@"-[deleteLeadingWhitespaces]",
	    (s[0] = [OFMutableString stringWithString: whitespace[0]]) &&
	    R([s[0] deleteLeadingWhitespaces]) &&
	    [s[0] isEqual: @"asd  \t \t\t\r\n"] &&
	    (s[0] = [OFMutableString stringWithString: whitespace[1]]) &&