NSString: Fix -commonPrefixWithString:options: behaviour (#455)

* Update changelog

* NSString: fix -commonPrefixWithString:options: behaviour

* NSString: More test cases
This commit is contained in:
Hugo Melder 2024-10-28 06:42:41 -07:00 committed by GitHub
parent 8b65241b03
commit cf4c985e46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 0 deletions

View file

@ -144,6 +144,9 @@ int main()
PASS([@"" isEqual: nil] == NO, "an empty string is not null");
PASS([@"" isEqualToString: nil] == NO, "an empty string is not null");
s = [@"test" commonPrefixWithString: nil options: 0];
PASS_EQUAL(s, @"", "Common prefix of some string with nil is empty string");
[arp release]; arp = nil;
return 0;
}