core: change encoding of the result returned by chat_read_file C API (#3036)

* core: change encoding of the result returned by chat_read_file C API

* remove unused dependency

* remove pointer cast
This commit is contained in:
Evgeny Poberezkin
2023-09-07 20:18:43 +01:00
committed by GitHub
parent b5a0269aa2
commit 82fd3b9004
3 changed files with 33 additions and 29 deletions

View File

@@ -1041,9 +1041,9 @@ testXFTPFileTransferEncrypted =
alice <## "completed uploading file 1 (test.pdf) for bob"
bob <## "started receiving file 1 (test.pdf) from alice"
bob <## "completed receiving file 1 (test.pdf) from alice"
(RFResult destLen, dest) <- chatReadFile "./tests/tmp/bob/test.pdf" (strEncode key) (strEncode nonce)
fromIntegral destLen `shouldBe` srcLen
dest `shouldBe` src
Right dest <- chatReadFile "./tests/tmp/bob/test.pdf" (strEncode key) (strEncode nonce)
LB.length dest `shouldBe` fromIntegral srcLen
LB.toStrict dest `shouldBe` src
where
cfg = testCfg {xftpFileConfig = Just $ XFTPFileConfig {minFileSize = 0}, tempDir = Just "./tests/tmp"}