submodule tests: test for a "foreach" blind-spot

We tested for "--" followed by command names, but not for "--"
followed by an argument that looks like an option, let's do that.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2022-11-08 15:10:35 +01:00 коммит произвёл Taylor Blau
Родитель 435285bd82
Коммит d50d8485ef
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -154,6 +154,11 @@ test_expect_success 'use "submodule foreach" to checkout 2nd level submodule' '
)
'
test_expect_success 'usage: foreach -- --not-an-option' '
test_expect_code 1 git submodule foreach -- --not-an-option &&
test_expect_code 1 git -C clone2 submodule foreach -- --not-an-option
'
test_expect_success 'use "foreach --recursive" to checkout all submodules' '
(
cd clone2 &&