Skip to content

Commit 6ce7017

Browse files
committed
Run indentation tests against Vim AND Neovim
Closes: #39
1 parent 78ecad5 commit 6ce7017

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Diff for: .github/workflows/clojure.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
with:
3030
lein: 2.11.2
3131

32+
- run: sudo apt install -y neovim
33+
3234
- name: Cache m2
3335
uses: actions/cache@v3
3436
env:

Diff for: clj/test/vim/indent_test.clj

+9-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,19 @@
3131
:actual (slurp actual)
3232
:actual-file actual})))
3333

34-
;; TODO: do this parallisation more intelligently with agents.
35-
(deftest test-indent
36-
"Runs all indentation tests in parallel"
34+
(defn- run-tests []
3735
(let [test-case-dir (io/file (io/resource "indent-test-cases"))
3836
test-cases (get-test-cases test-case-dir)]
3937
(doseq [{:keys [test-case expected expected-file actual actual-file]}
4038
(pmap (partial run-test-case test-case-dir) test-cases)]
4139
(testing test-case
4240
(is (= expected actual)
4341
(format "(not= \"%s\"\n \"%s\")" expected-file actual-file))))))
42+
43+
(deftest test-indent-vim
44+
"Runs all indentation tests in parallel against Vim"
45+
(run-tests))
46+
47+
(deftest test-indent-nvim
48+
"Runs all indentation tests in parallel against Neovim"
49+
(binding [h/*vim* "nvim"] (run-tests)))

0 commit comments

Comments
 (0)