summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 161261b)
raw | patch | inline | side by side (parent: 161261b)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Mon, 23 Feb 2009 05:08:12 +0000 (06:08 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 Feb 2009 05:56:46 +0000 (21:56 -0800) |
Test added for completeness (it passes).
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-cvs.sh | patch | blob | history | |
t/t9600-cvsimport.sh | patch | blob | history |
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 67389012eb3f4604f2979bcb1f4e2144fdfd33bf..1f73c07df8573aa356fbc17109bc44a387455343 100644 (file)
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
exit
;;
esac
+
+test_cvs_co () {
+ # Usage: test_cvs_co BRANCH_NAME
+ rm -rf module-cvs-"$1"
+ if [ "$1" = "master" ]
+ then
+ $CVS co -P -d module-cvs-"$1" -A module
+ else
+ $CVS co -P -d module-cvs-"$1" -r "$1" module
+ fi
+}
+
+test_git_co () {
+ # Usage: test_git_co BRANCH_NAME
+ (cd module-git && git checkout "$1")
+}
+
+test_cmp_branch_file () {
+ # Usage: test_cmp_branch_file BRANCH_NAME PATH
+ # The branch must already be checked out of CVS and git.
+ test_cmp module-cvs-"$1"/"$2" module-git/"$2"
+}
+
+test_cmp_branch_tree () {
+ # Usage: test_cmp_branch_tree BRANCH_NAME
+ # Check BRANCH_NAME out of CVS and git and make sure that all
+ # of the files and directories are identical.
+
+ test_cvs_co "$1" &&
+ test_git_co "$1" &&
+ (
+ cd module-cvs-"$1"
+ find . -type d -name CVS -prune -o -type f -print
+ ) | sort >module-cvs-"$1".list &&
+ (
+ cd module-git
+ find . -type d -name .git -prune -o -type f -print
+ ) | sort >module-git-"$1".list &&
+ test_cmp module-cvs-"$1".list module-git-"$1".list &&
+ cat module-cvs-"$1".list | while read f
+ do
+ test_cmp_branch_file "$1" "$f" || return 1
+ done
+}
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 3110a8ce362ba0362d7cce3d549e4257ad6fa3ff..e3734b3ba935f6d0b6b5a6fa83c341dee2f029d2 100755 (executable)
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
'
+test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+
test_done