Skip to content

Commit

Permalink
Diff stuff is Mac-only.
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Jul 11, 2013
1 parent c05c1f8 commit 888c430
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Generic/ECTestCase.m
Expand Up @@ -163,6 +163,7 @@ - (void)assertString:(NSString*)string matchesContentsOfURL:(NSURL*)url mode:(EC
NSString* expected = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error];
if (expected)
{
#if !TARGET_OS_IPHONE
if (mode == ECAssertStringDiff)
{
if (![string isEqualToString:expected])
Expand All @@ -175,6 +176,7 @@ - (void)assertString:(NSString*)string matchesContentsOfURL:(NSURL*)url mode:(EC
}
}
else
#endif
{
[self assertString:string matchesString:expected mode:mode];
}
Expand Down Expand Up @@ -329,6 +331,7 @@ - (void)timeToExitRunLoop

- (void)diffURL:(NSURL*)url1 againstURL:(NSURL*)url2
{
#if !TARGET_OS_IPHONE // this doesn't make a lot of sense on iOS
// To use a different diff tool, do, eg:
// defaults write otest DiffTool "/usr/local/bin/ksdiff"

Expand All @@ -342,6 +345,7 @@ - (void)diffURL:(NSURL*)url1 againstURL:(NSURL*)url2
[task setArguments: @[[url1 path], [url2 path]]];
[task launch];
[task release];
#endif
}

@end
Expand Down

0 comments on commit 888c430

Please sign in to comment.