Last active
August 29, 2015 13:56
-
-
Save justin/8886432 to your computer and use it in GitHub Desktop.
Another NSRegularExpression test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <XCTest/XCTest.h> | |
#import "RSFoundationExtras.h" | |
@interface RSFoundationExtrasTests : XCTestCase | |
@end | |
@implementation RSFoundationExtrasTests | |
- (void)testExtractingLinksFromAPostWithMarkdownLinkSyntax | |
{ | |
// jww: 02/08/14 | |
// As of iOS 7.1b5 if you have two URLs wrapped in markdown link syntax | |
// and try to run it through Gruber's URL detection regex, it will deadlock. | |
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
NSString *markdownPost = @"[http://daringfireball.net](http://carpeaqua.com)"; | |
XCTAssertEqual([[markdownPost rs_links] count], (unsigned long)2); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment