Skip to content

Commit f4ceb50

Browse files
authored
Merge pull request #231497 from Homebrew/nvr-test
neovim-remote: update test
2 parents fe94934 + 0f00c69 commit f4ceb50

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Formula/n/neovim-remote.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,19 @@ def install
5454
test do
5555
socket = testpath/"nvimsocket"
5656
file = testpath/"test.txt"
57-
ENV["NVIM_LISTEN_ADDRESS"] = socket
5857

5958
nvim = spawn(
60-
{ "NVIM_LISTEN_ADDRESS" => socket },
61-
Formula["neovim"].opt_bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", file,
59+
Formula["neovim"].opt_bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", "--listen", socket, file,
6260
[:out, :err] => "/dev/null"
6361
)
6462
sleep 5
6563

6664
str = "Hello from neovim-remote!"
67-
system bin/"nvr", "--remote-send", "i#{str}<esc>:write<cr>"
65+
system bin/"nvr", "--servername", socket, "--remote-send", "i#{str}<ESC>:write<CR>"
6866
assert_equal str, file.read.chomp
6967
assert_equal Process.kill(0, nvim), 1
7068

71-
system bin/"nvr", "--remote-send", ":quit<cr>"
69+
system bin/"nvr", "--servername", socket, "--remote-send", ":quit<CR>"
7270

7371
# Test will be terminated by the timeout
7472
# if `:quit` was not sent correctly

0 commit comments

Comments
 (0)