likes, mention parsing, lots of stuff

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-04 16:26:10 -07:00
parent 403fa74f8d
commit f42bc2e91e
25 changed files with 608 additions and 118 deletions

View File

@@ -32,5 +32,15 @@ class damusTests: XCTestCase {
// Put the code you want to measure the time of here.
}
}
func testParseMention() throws {
let parsed = parse_mentions(content: "this is #[0] a mention", tags: [["e", "event_id"]])
XCTAssertNotNil(parsed)
XCTAssertEqual(parsed.count, 3)
XCTAssertTrue(parsed[0].is_text)
XCTAssertTrue(parsed[1].is_mention)
XCTAssertTrue(parsed[2].is_text)
}
}