Skip to content

Commit ec3bb1d

Browse files
committed
Add basic integration test
1 parent e6f58fe commit ec3bb1d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

TODO

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Versioning
22
re: https://github.com/neovim/neovim/pull/5535
33
re: https://github.com/neovim/neovim/pull/5386
44

5-
[_] an we start writing tests for these things?
5+
[X] an we start writing tests for these things?
66
[X] We'd have to start an nvim --embed, and maybe specify the NVIM_... ?
77
[X] Then, we connect
88
[X] Test version validation
9-
[_] Integration test
9+
[X] Integration test
1010
-insert some text in current buffer
1111
-command split the a new buffer put some stuff in it
1212
-command switch back to the original buffer
@@ -17,7 +17,7 @@ Versioning
1717
the version of Neovim used.
1818

1919
Following the philosophy described above, we need
20-
[_] Make the user specify required API level on `connect`
20+
[X] Make the user specify required API level on `connect`
2121

2222
[_] Change the api to one function `exec`, pass the op as the first
2323
arg, and then use varargs, or a collection of args.

test/neovim-client/nvim_test.clj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,17 @@
4848
(is (client.nvim/version-supported?
4949
(client.nvim/new* 1 in out false))))))
5050

51+
(deftest change-buffer-text
52+
(with-neovim
53+
(let [{:keys [in out]} *neovim*
54+
conn (client.nvim/new* 1 in out false)]
55+
(let [b1 (client.nvim/vim-get-current-buffer conn)
56+
_ (client.nvim/buffer-set-line conn b1 0 "foo")
57+
_ (client.nvim/vim-command conn "new")
58+
b2 (client.nvim/vim-get-current-buffer conn)
59+
_ (client.nvim/buffer-set-line conn b2 0 "bar")]
60+
(is (= "foo" (client.nvim/buffer-get-line conn b1 0)))
61+
(is (= "bar") (client.nvim/buffer-get-line conn b2 0))))))
62+
5163
#_(clojure.tools.namespace.repl/refresh)
5264
#_(clojure.test/run-tests 'neovim-client.nvim-test)

0 commit comments

Comments
 (0)