damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 1f648057d5da6c3c6f06f955f88516ebbe4b800a
parent ea14099b627f55f46928d94359202ecbea9cbcae
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 11 Apr 2023 10:23:16 -0700

Add another bech32 test

Diffstat:
MdamusTests/NIP19Tests.swift | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/damusTests/NIP19Tests.swift b/damusTests/NIP19Tests.swift @@ -42,6 +42,16 @@ final class NIP19Tests: XCTestCase { XCTAssertEqual(res[1], .mention(expected_mention)) } + func test_mention_with_adjacent() throws { + let res = parse_mentions(content: " nostr:note1s4p70596lv50x0zftuses32t6ck8x6wgd4edwacyetfxwns2jtysux7vep?", tags: []) + XCTAssertEqual(res.count, 3) + let expected_ref = ReferencedId(ref_id: "8543e7d0bafb28f33c495f2198454bd62c7369c86d72d77704cad2674e0a92c9", relay_id: nil, key: "e") + let expected_mention = Mention(index: nil, type: .event, ref: expected_ref) + XCTAssertEqual(res[0], .text(" ")) + XCTAssertEqual(res[1], .mention(expected_mention)) + XCTAssertEqual(res[2], .text("?")) + } + func testPerformanceExample() throws { // This is an example of a performance test case. self.measure {