aboutsummaryrefslogtreecommitdiffstats
path: root/UnitTests
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-15 00:58:32 +0200
committerMax <post@wickenrode.com>2015-10-15 00:58:32 +0200
commitfa62a27d1fea6f8671a6c021d792433d64fc8d8f (patch)
tree4884ffe72d7f23a5083e5eff65725f806ea001ae /UnitTests
parent264babe2f0d1b5c7713c1a9df0417e4ec5b84bd2 (diff)
downloadsequelpro-fa62a27d1fea6f8671a6c021d792433d64fc8d8f.tar.gz
sequelpro-fa62a27d1fea6f8671a6c021d792433d64fc8d8f.tar.bz2
sequelpro-fa62a27d1fea6f8671a6c021d792433d64fc8d8f.zip
Add validation of SSL client cert file
Diffstat (limited to 'UnitTests')
-rw-r--r--UnitTests/SPDataAdditionsTests.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/UnitTests/SPDataAdditionsTests.m b/UnitTests/SPDataAdditionsTests.m
index c7a03f7f..988267d2 100644
--- a/UnitTests/SPDataAdditionsTests.m
+++ b/UnitTests/SPDataAdditionsTests.m
@@ -371,6 +371,17 @@
}];
STAssertTrue(invocations==2, @"other line breaks when only CRLF is expected");
}
+ //stopping early
+ {
+ const char inp[] = "Two\nLines\n";
+ __block NSUInteger invocations = 0;
+ NSData *data = [NSData dataWithBytes:inp length:strlen(inp)];
+ [data enumerateLinesBreakingAt:SPLineTerminatorAny withBlock:^(NSRange line, BOOL *stop) {
+ invocations++;
+ *stop = YES;
+ }];
+ STAssertTrue(invocations==1, @"File with two lines, stopped after first");
+ }
}
@end