From 934f399e1974a7ea565ec4ff5119e428e14aa784 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 24 Jul 2024 02:56:51 +0000 Subject: [PATCH] basic tests of bracketed paste callback (#543) --- test/repl.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/repl.jl b/test/repl.jl index 7486a7f9..6493c267 100644 --- a/test/repl.jl +++ b/test/repl.jl @@ -112,3 +112,14 @@ send_repl("paste0('check', 'point')") send_repl("invisible('apple')") send_repl("paste0('check', 'point')") @test !occursin("\"apple\"", read_repl(output, "checkpoint")) + +# bracked paste callback +send_repl("\e[200~1 + 1\n\n2 + 2\n3 + 3\e[201~\n") +@test check_repl_stdout("[1] 6") + +send_repl("\e[200~1 + \n 1\n\e[201~") +@test check_repl_stdout("[1] 2") + +send_repl("\e[200~1 + 1\e[201~ +") + +@test RCall.RPrompt.repl_inited(repl)