Telegram-style progress ring для фото/файлов + batch DB writes оптимизация
This commit is contained in:
@@ -764,9 +764,11 @@ final class DeliveryReliabilityTests: XCTestCase {
|
||||
XCTAssertTrue(MessageCellLayout.isGarbageOrEncrypted("CHNK:chunk1::chunk2::chunk3"),
|
||||
"Must detect chunked format")
|
||||
|
||||
// Long hex string (≥40 chars)
|
||||
XCTAssertTrue(MessageCellLayout.isGarbageOrEncrypted(String(repeating: "a1b2c3d4", count: 6)),
|
||||
"Must detect long hex strings")
|
||||
// Long hex string — must NOT be flagged (public keys, tx hashes are valid user content)
|
||||
XCTAssertFalse(MessageCellLayout.isGarbageOrEncrypted(String(repeating: "a1b2c3d4", count: 6)),
|
||||
"Long hex strings (public keys, hashes) must not be flagged")
|
||||
XCTAssertFalse(MessageCellLayout.isGarbageOrEncrypted("02abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab"),
|
||||
"secp256k1 public key must not be flagged")
|
||||
|
||||
// U+FFFD only (failed decryption)
|
||||
XCTAssertTrue(MessageCellLayout.isGarbageOrEncrypted("\u{FFFD}\u{FFFD}\u{FFFD}"),
|
||||
|
||||
Reference in New Issue
Block a user