me
/
guix
Archived
1
0
Fork 0

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>
master
Jean-Pierre De Jesus DIAZ 2023-12-27 16:31:49 +01:00 committed by Efraim Flashner
parent cb651129a3
commit 6abff4eafa
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 13 additions and 5 deletions

View File

@ -475,7 +475,8 @@ trouble using them, because you do not have to remember each snippet name.")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'install 'check (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? (when tests?
(display "Running Python unit tests.\n") (display "Running Python unit tests.\n")
(setenv "PYTHONPATH" (string-append (getcwd) "/python")) (setenv "PYTHONPATH" (string-append (getcwd) "/python"))
@ -489,12 +490,19 @@ trouble using them, because you do not have to remember each snippet name.")
"vim-vader")) "vim-vader"))
(vader-path (string-append (vader-path (string-append
vim-vader vim-vader
"/share/vim/vimfiles/pack/guix/start/vader"))) (if vim?
(with-directory-excursion "tests/vim" "/share/vim/vimfiles"
(setenv "VADER_PATH" vader-path) "/share/nvim/site")
(invoke "vim" "/pack/guix/start/vader"))
"-E" "-Nu" "vimrc" (command `(,@(if vim? '("vim" "-E") '())
,@(if neovim? '("nvim" "--headless") '())
"-Nu" "vimrc"
"-c" "Vader! *.vader"))) "-c" "Vader! *.vader")))
(with-directory-excursion "tests/vim"
(when neovim?
(setenv "HOME" (getcwd)))
(setenv "VADER_PATH" vader-path)
(apply invoke command)))
;; Remove __pycache__ files generated during testing so that ;; Remove __pycache__ files generated during testing so that
;; they don't get installed. ;; they don't get installed.