lib-submodule-update: teach test_submodule_content the -C <dir> flag

Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Mar 14, 2017 at 14:46 UTC 2f70edccb4c424ded7dc9afa4da6b17e213a5f96
1 file changed +5
t/lib-submodule-update.sh
+5
@@ -193,6 +193,11 @@ test_superproject_content () {
193 # Test that the given submodule at path "$1" contains the content according
194 # to the submodule commit recorded in the superproject's commit "$2"
195 test_submodule_content () {
196 + if test x"$1" = "x-C"
197 + then
198 + cd "$2"
199 + shift; shift;
200 + fi
201 if test $# != 2
202 then
203 echo "test_submodule_content needs two arguments"