aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/vim.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-20 00:05:51 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-20 00:06:39 +0100
commit5a717c55267c7ffd09445a7e0fb2733a12d2f996 (patch)
tree86a693153135e776fb0166ea9df2bddbe9cf4ff1 /gnu/packages/vim.scm
parent58f2ac142c8511c0ce81041b79937444dc39db9d (diff)
downloadguix-5a717c55267c7ffd09445a7e0fb2733a12d2f996.tar
guix-5a717c55267c7ffd09445a7e0fb2733a12d2f996.tar.gz
gnu: vim: Fix a failing test.
* gnu/packages/vim.scm (vim)[arguments]: Rename the ‘skip-failing-tests’ phase to ‘skip-or-fix-failing-tests’. Fix a failing test.
Diffstat (limited to 'gnu/packages/vim.scm')
-rw-r--r--gnu/packages/vim.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index c2115b15f5..26f2547d18 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -110,7 +110,7 @@
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")
#t))
- (add-before 'check 'skip-failing-tests
+ (add-before 'check 'skip-or-fix-failing-tests
(lambda _
;; This test assumes that PID 1 is run as root and that the user
;; running the test suite does not have permission to kill(1, 0)
@@ -131,6 +131,20 @@
(substitute* "src/testdir/test_popupwin.vim"
((".*Test_popup_drag_termwin.*" line)
(string-append line "return\n")))
+
+ ;; This test compares output against a golden ‘…/|b|i|n|/|s|h…’
+ ;; literal. We need to match that and substitute a similarly
+ ;; ‘spliced’ path to ‘sh’ in the store, truncated to the last
+ ;; 44 (spliced: 88) characters.
+ (let ((splice (lambda (s separator)
+ (string-join (map string (string->list s))
+ separator))))
+ (substitute* "src/testdir/dumps/Test_terminal_from_cmd.dump"
+ (((splice "/bin/sh" "\\|"))
+ (splice (string-take-right (which "sh") 44) "|"))
+ ;; Blindly fix some other differences based on error output.
+ (("^\\|!") "|<")
+ (("@37") "")))
#t)))))
(inputs
`(("gawk" ,gawk)