We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcf9dc1 commit 1208a63Copy full SHA for 1208a63
tests/grepdiff1/run-test
@@ -20,7 +20,16 @@ cat << EOF > diff
20
+b
21
EOF
22
23
-${GREPDIFF} '\+a' diff 2>errors >index || exit 1
+# Check if PCRE2 is being used by examining the help output
24
+if ${GREPDIFF} --help 2>&1 | grep -q "PCRE regexes are used by default"; then
25
+ # PCRE2 is enabled - need to escape the plus sign
26
+ PATTERN='\+a'
27
+else
28
+ # Standard regex - plus sign doesn't need escaping
29
+ PATTERN='+a'
30
+fi
31
+
32
+${GREPDIFF} "$PATTERN" diff 2>errors >index || exit 1
33
[ -s errors ] && exit 1
34
35
cat << EOF | cmp - index || exit 1
0 commit comments