Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-11-26 01:12:52 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-26 01:43:48 +0300
commitd15671943e763902c7a9c070a988f3b0489f11f7 (patch)
treea13a95c2eb6a1fd85dd17738d1dc0f09bd3d6c8c /t/t1300-config.sh
parent2076dba281a0e9b16dc670d59a87c62c97b90a74 (diff)
t1300: add test for --replace-all with value-pattern
The --replace-all option was added in 4ddba79d (git-config-set: add more options) but was not tested along with the 'value-pattern' parameter. Since we will be updating this option to optionally treat 'value-pattern' as a fixed string, let's add a test here that documents the current behavior. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-xt/t1300-config.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index a74bcb4c85..bddf5250dc 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1956,4 +1956,18 @@ test_expect_success 'set all config with value-pattern' '
test_cmp expect actual
'
+test_expect_success '--replace-all and value-pattern' '
+ test_when_finished rm -f config &&
+ git config --file=config --add abc.key one &&
+ git config --file=config --add abc.key two &&
+ git config --file=config --add abc.key three &&
+ git config --file=config --replace-all abc.key four "o+" &&
+ git config --file=config --list >actual &&
+ cat >expect <<-\EOF &&
+ abc.key=four
+ abc.key=three
+ EOF
+ test_cmp expect actual
+'
+
test_done