more deletion tests

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32278 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-22 05:49:34 +00:00
parent 021c9eaf0e
commit ee2bbe4f71

View file

@ -107,6 +107,18 @@ int main()
"'/' stringByDeletingLastPathComponent == '/'");
PASS([[@"hello" stringByDeletingLastPathComponent] isEqual: @""],
"'hello' stringByDeletingLastPathComponent == ''");
PASS_EQUAL([@"/hello/there/.." stringByDeletingLastPathComponent],
@"/hello/there",
"'/hello/there/..' stringByDeletingLastPathComponent == '/hello/there'");
PASS_EQUAL([@"/hello/there/." stringByDeletingLastPathComponent],
@"/hello/there",
"'/hello/there/.' stringByDeletingLastPathComponent == '/hello/there'");
PASS_EQUAL([@"/hello/../there" stringByDeletingLastPathComponent],
@"/hello/..",
"'/hello/../there' stringByDeletingLastPathComponent == '/hello/..'");
PASS_EQUAL([@"/hello//../there" stringByDeletingLastPathComponent],
@"/hello/..",
"'/hello//../there' stringByDeletingLastPathComponent == '/hello/..'");
/* Check behavior for UNC absolute and relative paths.
*/