checkout: call the new submodule update test framework
authorJens Lehmann <Jens.Lehmann@web.de>
Sun, 15 Jun 2014 16:58:44 +0000 (18:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2014 19:06:15 +0000 (12:06 -0700)
Test that the checkout command updates the work tree as expected with
and without the '-f' flag.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2013-checkout-submodule.sh
index 06b18f8bc1e2991170736254bf3c558ab4673d13..6847f7582234d656563f867976a64142a3a01621 100755 (executable)
@@ -3,6 +3,7 @@
 test_description='checkout can handle submodules'
 
 . ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-submodule-update.sh
 
 test_expect_success 'setup' '
        mkdir submodule &&
@@ -62,4 +63,8 @@ test_expect_success '"checkout <submodule>" honors submodule.*.ignore from .git/
        ! test -s actual
 '
 
+test_submodule_switch "git checkout"
+
+test_submodule_forced_switch "git checkout -f"
+
 test_done