Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/grepdiff1/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ cat << EOF > diff
+b
EOF

${GREPDIFF} '\+a' diff 2>errors >index || exit 1
# Check if PCRE2 is being used by examining the help output
if ${GREPDIFF} --help 2>&1 | grep -q "PCRE regexes are used by default"; then
# PCRE2 is enabled - need to escape the plus sign
PATTERN='\+a'
else
# Standard regex - plus sign doesn't need escaping
PATTERN='+a'
fi

${GREPDIFF} "$PATTERN" diff 2>errors >index || exit 1
[ -s errors ] && exit 1

cat << EOF | cmp - index || exit 1
Expand Down