diff --git a/tests/ChatTests.hs b/tests/ChatTests.hs index af563f361d..5c4c3efee6 100644 --- a/tests/ChatTests.hs +++ b/tests/ChatTests.hs @@ -88,6 +88,7 @@ chatTests = do describe "sending and receiving files" $ do describe "send and receive file" $ fileTestMatrix2 runTestFileTransfer it "send and receive file inline (without accepting)" testInlineFileTransfer + it "accept inline file transfer, sender cancels during transfer" testAcceptInlineFileSndCancelDuringTransfer it "send and receive small file inline (default config)" testSmallInlineFileTransfer it "small file sent without acceptance is ignored in terminal by default" testSmallInlineFileIgnored it "receive file inline with inline=on option" testReceiveInline @@ -1906,6 +1907,37 @@ testInlineFileTransfer = where cfg = testCfg {inlineFiles = defaultInlineFilesConfig {offerChunks = 100, sendChunks = 100, receiveChunks = 100}} +testAcceptInlineFileSndCancelDuringTransfer :: IO () +testAcceptInlineFileSndCancelDuringTransfer = + testChatCfg2 cfg aliceProfile bobProfile $ \alice bob -> do + connectUsers alice bob + bob ##> "/_files_folder ./tests/tmp/" + bob <## "ok" + alice #> "/f @bob ./tests/fixtures/test_1MB.pdf" + alice <## "use /fc 1 to cancel sending" + bob <# "alice> sends file test_1MB.pdf (1017.7 KiB / 1042157 bytes)" + bob <## "use /fr 1 [