summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/clitest-grep-compat.patch
blob: 8707c35e3ead918bb3ce59fad43ba4aa2cb1d21a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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