summary refs log tree commit diff
path: root/gnu/packages/patches/clitest-grep-compat.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2023-04-30 23:16:54 +0800
committerMarius Bakke <marius@gnu.org>2023-04-30 23:25:46 +0800
commita34348967e032acfab2aa0b512d318a70f5543dd (patch)
tree9ef3bde4168cc015515c92a6db9f95f564a82bbe /gnu/packages/patches/clitest-grep-compat.patch
parentf9a60f34670ba36724d3efec0dc266e0d6d0cb00 (diff)
downloadguix-a34348967e032acfab2aa0b512d318a70f5543dd.tar.gz
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.
Diffstat (limited to 'gnu/packages/patches/clitest-grep-compat.patch')
-rw-r--r--gnu/packages/patches/clitest-grep-compat.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/patches/clitest-grep-compat.patch b/gnu/packages/patches/clitest-grep-compat.patch
new file mode 100644
index 0000000000..8707c35e3e
--- /dev/null
+++ b/gnu/packages/patches/clitest-grep-compat.patch
@@ -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
+