aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJean-Pierre De Jesus DIAZ <jean@foundationdevices.com>2023-12-27 16:31:49 +0100
committerEfraim Flashner <efraim@flashner.co.il>2024-01-01 10:49:17 +0200
commit6abff4eafab1206f1de1451501550ade1eaccd3c (patch)
tree6e95c01a212bda9e5ca9f0ac2ebbfc2f065bb11f /gnu/packages
parentcb651129a3f061b619749d3e35fa0054ae40797d (diff)
downloadguix-6abff4eafab1206f1de1451501550ade1eaccd3c.tar.gz
guix-6abff4eafab1206f1de1451501550ade1eaccd3c.zip
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>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/vim.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index e27feb13f7..5f211b120d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -475,7 +475,8 @@ trouble using them, because you do not have to remember each snippet name.")
#: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 @@ trouble using them, because you do not have to remember each snippet name.")
"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.