Extend the grep tests to assert that setting
"grep.patternType=extended" followed by "grep.patternType=default"
will behave as if "--extended-regexp" was provided, and not as
"--basic-regexp". In a subsequent commit we'll need to treat
"grep.patternType=default" as a special-case, but let's make sure we
don't ignore it if "grep.patternType" was set to a non-"default" value
before.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
t/t7810-grep.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index 6b6423a07c3..724b1bbbc1c 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -451,6 +451,15 @@ do
test_cmp expected actual
'
+ test_expect_success "grep $L with grep.patternType=extended and grep.patternType=default" '
+ echo "${HC}ab:a+bc" >expected &&
+ git \
+ -c grep.patternType=extended \
+ -c grep.patternType=default \
+ grep "a+b*c" $H ab >actual &&
+ test_cmp expected actual
+ '
+
test_expect_success "grep $L with grep.patternType=extended and grep.extendedRegexp=false" '
echo "${HC}ab:abc" >expected &&
git \--
2.34.1.841.gf15fb7e6f34