From: Ping Yin Date: Fri, 2 May 2008 13:35:34 +0000 (+0800) Subject: Add t7506 to test submodule related functions for git-status X-Git-Tag: v1.5.6-rc0~68^2~2^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=27bfd950c19c76dce28a8c8693f4ed8603875d26;p=git.git Add t7506 to test submodule related functions for git-status Signed-off-by: Ping Yin Signed-off-by: Junio C Hamano --- diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index ba6679c6e..61caad0f5 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -50,7 +50,7 @@ test_expect_success 'git diff-files --raw' ' test_cmp expect actual.files ' -test_expect_success 'git diff (empty submodule dir)' ' +test_expect_failure 'git diff (empty submodule dir)' ' : >empty && rm -rf sub/* sub/.git && git diff > actual.empty && diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh new file mode 100755 index 000000000..8987c9eb7 --- /dev/null +++ b/t/t7506-status-submodule.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +test_description='git-status for submodule' + +. ./test-lib.sh + +test_expect_success 'setup' ' + test_create_repo sub + cd sub && + : >bar && + git add bar && + git commit -m " Add bar" && + cd .. && + git add sub && + git commit -m "Add submodule sub" +' + +test_expect_success 'status clean' ' + git status | + grep "nothing to commit" +' +test_expect_success 'status -a clean' ' + git status -a | + grep "nothing to commit" +' +test_expect_success 'rm submodule contents' ' + rm -rf sub/* sub/.git +' +test_expect_success 'status clean (empty submodule dir)' ' + git status | + grep "nothing to commit" +' +test_expect_failure 'status -a clean (empty submodule dir)' ' + git status -a | + grep "nothing to commit" +' + +test_done