Skip to content

Instantly share code, notes, and snippets.

@odrobnik
Created December 12, 2016 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odrobnik/152c128fe9b35460acce3bac1bf7fe96 to your computer and use it in GitHub Desktop.
Save odrobnik/152c128fe9b35460acce3bac1bf7fe96 to your computer and use it in GitHub Desktop.
func testHangSquareBracket()
{
let input = "Text [-( Text"
let expectation = self.expectation(description: "Should not hang")
DispatchQueue.global().async {
let builder = BBCodeAttributedStringBuilder(bbcode: input)
let output = builder.attributedString
XCTAssertNotNil(output)
expectation.fulfill()
}
self.waitForExpectations(timeout: 1.0) { (error) in
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment