Testing Julia REPL in a libuv spawn call

klafyvel
Thu, 19 Dec 2024 06:40:18 +0000
General Usage

Hi there, I might use a bit of help with Lua, libuv, and the Julia REPL (I initially posted on slack, but folk rightfully pointed that this is better suited here). For context, I am writing integration tests for neovim’s plugin for REPLSmuggler.jl. I have julia running through a uv.spawn call, for which I make available to lua stdin stdout and stderr (see here ). It kind of works if I write directly to julia’s stdin and check its stdout (essentially, this first test passes: feat(tests): Add base architecture for testing the module. by Klafyvel · Pull Request #58 · Klafyvel/nvim-smuggler · GitHub), but when I try printing stuff through REPLSmuggler, nothing happens (same if I try to e.g. write in a file). Since my tests also show me that I don’t get usual stuff I would expect from the Julia REPL (for example the julia> prompt), I guess this means the REPL is in a different state from what I get if I just run it from a terminal. This might be a reason why the test codes are not being run, as REPLSmuggler.jl depends on the internals of LineEditREPL.So my questions are:

1. Is Julia still using LineEditREPL when Julia runs as a subprocess, and its stdio are pipes?

2. If not, how can I make it use LineEditREPL?

1 post - 1 participant

Read full topic