mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: clitest: Fix test failure with newer grep.
* gnu/packages/patches/clitest-grep-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/check.scm (clitest)[source](patches): New field. [arguments]: While at it, remove obsolete substitution.
This commit is contained in:
parent
f9a60f3467
commit
a34348967e
3 changed files with 29 additions and 7 deletions
|
@ -1000,6 +1000,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/classpath-aarch64-support.patch \
|
%D%/packages/patches/classpath-aarch64-support.patch \
|
||||||
%D%/packages/patches/classpath-miscompilation.patch \
|
%D%/packages/patches/classpath-miscompilation.patch \
|
||||||
%D%/packages/patches/cling-use-shared-library.patch \
|
%D%/packages/patches/cling-use-shared-library.patch \
|
||||||
|
%D%/packages/patches/clitest-grep-compat.patch \
|
||||||
%D%/packages/patches/clog-fix-shared-build.patch \
|
%D%/packages/patches/clog-fix-shared-build.patch \
|
||||||
%D%/packages/patches/clucene-pkgconfig.patch \
|
%D%/packages/patches/clucene-pkgconfig.patch \
|
||||||
%D%/packages/patches/cmake-curl-certificates-3.24.patch \
|
%D%/packages/patches/cmake-curl-certificates-3.24.patch \
|
||||||
|
|
|
@ -310,6 +310,7 @@ (define-public clitest
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference (url home-page) (commit version)))
|
(uri (git-reference (url home-page) (commit version)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
|
(patches (search-patches "clitest-grep-compat.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1p745mxiq3hgi3ywfljs5sa1psi06awwjxzw0j9c2xx1b09yqv4a"))))
|
"1p745mxiq3hgi3ywfljs5sa1psi06awwjxzw0j9c2xx1b09yqv4a"))))
|
||||||
|
@ -325,13 +326,6 @@ (define-public clitest
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(substitute* "test.md"
|
|
||||||
;; One test looks for an error from grep in the form "grep: foo",
|
|
||||||
;; but our grep returns the absolute file name on errors. Adjust
|
|
||||||
;; the test to cope with that.
|
|
||||||
(("sed 's/\\^e\\*grep: \\.\\*/")
|
|
||||||
"sed 's/.*e*grep: .*/"))
|
|
||||||
|
|
||||||
(setenv "HOME" "/tmp")
|
(setenv "HOME" "/tmp")
|
||||||
(invoke "./clitest" "test.md"))))
|
(invoke "./clitest" "test.md"))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
|
|
27
gnu/packages/patches/clitest-grep-compat.patch
Normal file
27
gnu/packages/patches/clitest-grep-compat.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
Suppress a warning from grep which causes tests to fail.
|
||||||
|
|
||||||
|
Taken from upstream pull request:
|
||||||
|
|
||||||
|
https://github.com/aureliojargas/clitest/pull/54
|
||||||
|
|
||||||
|
diff --git a/test/inline-match-egrep.sh b/test/inline-match-egrep.sh
|
||||||
|
--- a/test/inline-match-egrep.sh
|
||||||
|
+++ b/test/inline-match-egrep.sh
|
||||||
|
@@ -42,7 +42,7 @@ $ printf ' \t \t\t \n' #=> --egrep ^ $
|
||||||
|
# egrep regexes. You'll need to test in your system if that's the
|
||||||
|
# case. I recommend using a literal tab to avoid problems.
|
||||||
|
|
||||||
|
-$ printf 'may\tfail' #=> --egrep ^may\tfail$
|
||||||
|
+$ printf 'may\tfail' #=> --egrep ^may\\tfail$
|
||||||
|
$ printf 'may\tfail' #=> --egrep ^may[\t]fail$
|
||||||
|
$ printf 'will\tmatch' #=> --egrep ^will match$
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ $ printf 'will\tmatch' #=> --egrep ^will match$
|
||||||
|
# These tests will fail:
|
||||||
|
|
||||||
|
$ printf 'will\nfail' #=> --egrep will.*fail
|
||||||
|
-$ printf 'will\nfail' #=> --egrep will\nfail
|
||||||
|
+$ printf 'will\nfail' #=> --egrep will\\nfail
|
||||||
|
|
||||||
|
# If one line of a multiline results matches, the test is OK
|
||||||
|
|
Loading…
Reference in a new issue