From 23c0c0952d43c84a3740ddf3ff3fba5b5f106dcf Mon Sep 17 00:00:00 2001 From: rfm Date: Fri, 22 May 2015 15:28:35 +0000 Subject: [PATCH] add a couple of checks for hasPrefix: and hasSuffix: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38522 72102866-910b-0410-8b05-ffd578937521 --- Tests/base/NSString/test00.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/base/NSString/test00.m b/Tests/base/NSString/test00.m index 98824f0a9..ed9368a1a 100644 --- a/Tests/base/NSString/test00.m +++ b/Tests/base/NSString/test00.m @@ -428,6 +428,11 @@ int main() [str release]; PASS_EQUAL(sub, @"aaa", "a substring uses its own buffer"); + PASS(YES == [@"hello" hasPrefix: @"hel"], "hello has hel as a prefix"); + PASS(NO == [@"hello" hasPrefix: @"Hel"], "hello does not have Hel as a prefix"); + PASS(YES == [@"hello" hasSuffix: @"llo"], "hello has llo as a suffix"); + PASS(NO == [@"hello" hasSuffix: @"lLo"], "hello does not have lLo as a suffix"); + [arp release]; arp = nil; return 0; }