t7419, t7420: use test_cmp_config instead of grepping .gitmodules

We have a test function to verify config files. Use it as it's more
precise.

Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jan Alexander Steffens (heftig)
2023-10-03 20:50:45 +02:00
committed by Junio C Hamano
parent b027fb0784
commit 5fc880632d
2 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ test_expect_success 'test submodule set-url' '
cd super &&
test_must_fail git submodule update --remote &&
git submodule set-url submodule ../newsubmodule &&
grep -F "url = ../newsubmodule" .gitmodules &&
test_cmp_config ../newsubmodule -f .gitmodules submodule.submodule.url &&
git submodule update --remote
) &&
git -C super/submodule show >actual &&