mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-21 01:26:43 +01:00
gnu: vim-coqtail: Allow using neovim for tests.
* gnu/packages/vim.scm (vim-coqtail): Allow using neovim for tests. Change-Id: I114b07dd9cf525a5571a37f51b2e6b2a57d5be46 Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
cb651129a3
commit
6abff4eafa
1 changed files with 13 additions and 5 deletions
|
@ -475,7 +475,8 @@ (define-public vim-coqtail
|
|||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'install 'check
|
||||
(lambda* (#:key inputs native-inputs tests? #:allow-other-keys)
|
||||
(lambda* (#:key inputs native-inputs tests? vim? neovim?
|
||||
#:allow-other-keys)
|
||||
(when tests?
|
||||
(display "Running Python unit tests.\n")
|
||||
(setenv "PYTHONPATH" (string-append (getcwd) "/python"))
|
||||
|
@ -489,12 +490,19 @@ (define-public vim-coqtail
|
|||
"vim-vader"))
|
||||
(vader-path (string-append
|
||||
vim-vader
|
||||
"/share/vim/vimfiles/pack/guix/start/vader")))
|
||||
(if vim?
|
||||
"/share/vim/vimfiles"
|
||||
"/share/nvim/site")
|
||||
"/pack/guix/start/vader"))
|
||||
(command `(,@(if vim? '("vim" "-E") '())
|
||||
,@(if neovim? '("nvim" "--headless") '())
|
||||
"-Nu" "vimrc"
|
||||
"-c" "Vader! *.vader")))
|
||||
(with-directory-excursion "tests/vim"
|
||||
(when neovim?
|
||||
(setenv "HOME" (getcwd)))
|
||||
(setenv "VADER_PATH" vader-path)
|
||||
(invoke "vim"
|
||||
"-E" "-Nu" "vimrc"
|
||||
"-c" "Vader! *.vader")))
|
||||
(apply invoke command)))
|
||||
|
||||
;; Remove __pycache__ files generated during testing so that
|
||||
;; they don't get installed.
|
||||
|
|
Loading…
Reference in a new issue