-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add t7506 to test submodule related functions for git-status
Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Ping Yin
authored and
Junio C Hamano
committed
May 5, 2008
1 parent
7c08a2a
commit 27bfd95
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |