From: Martin Waitz <tali@xxxxxxxxxxxxxx> Signed-off-by: Martin Waitz <tali@xxxxxxxxxxxxxx> Signed-off-by: Sven Verdoolaege <skimo@xxxxxxxxxx> --- t/t3041-subprojects-checkout.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) create mode 100755 t/t3041-subprojects-checkout.sh diff --git a/t/t3041-subprojects-checkout.sh b/t/t3041-subprojects-checkout.sh new file mode 100755 index 0000000..4b3cea9 --- /dev/null +++ b/t/t3041-subprojects-checkout.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +test_description='submodule checkout' +. ./test-lib.sh + +test_expect_success 'submodule creation' \ + '(mkdir A && cd A && + git init && + echo 1 > a && + git add a && + git commit -m "create submodule" || exit $? )' + +test_expect_success 'Super module creation' \ + 'git add A && + git commit -m "supermodule creation" && + git branch one' + +test_expect_success 'submodule change' \ + '(cd A && + echo 2 > a && + git add a && + git commit -m "create submodule" || exit $? )' + +test_expect_success 'supermodule change' \ + 'git add A && + git commit -m "supermodule creation"' + +test_expect_success 'supermodule switching branch' \ + 'git checkout one && + echo 1 > expected && + git diff expected A/a' + +test_expect_success 'supermodule reset' \ + 'git reset --hard master && + echo 2 > expected && + git diff expected A/a' + + +test_done -- 1.5.2.784.g5532e - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html