Skip to content

Commit

Permalink
Test converting the string back into a URL to see what happens. Passe…
Browse files Browse the repository at this point in the history
…s our tests, except when the target URL has no path at all. I need to consider that a little more.
  • Loading branch information
mikeabdullah committed Dec 6, 2011
1 parent c30aca3 commit 4492500
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions TestKSFileUtilities/TestKSURLUtilities.m
Expand Up @@ -38,6 +38,16 @@ - (void)checkURL:(NSURL *)a relativeToURL:(NSURL *)b againstExpectedResult:(NSSt
result);


// Get NSURL to see if it agrees with the result
NSURL *nsurlsOpinion = [[[NSURL URLWithString:result relativeToURL:b] absoluteURL] standardizedURL]; // gotta do absoluteURL first apparently
STAssertEqualObjects([nsurlsOpinion absoluteString], [a absoluteString],
@"(\'%@\' relative to \'%@\')",
result,
b,
[a absoluteString],
nsurlsOpinion);


// A trailing
if (testAppending)
{
Expand Down

0 comments on commit 4492500

Please sign in to comment.