aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2008-02-13 04:11:22 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-27 11:35:05 -0800
commit9057f0a62c8681bcff8460fec80747a6aa5b43c8 (patch)
treec4d65c326470ba50155374e4c2679ae51c632937
parent0460fb449b18cd95805c1bf97013957ee9b8ff9b (diff)
downloadgit-9057f0a62c8681bcff8460fec80747a6aa5b43c8.tar.gz
git-9057f0a62c8681bcff8460fec80747a6aa5b43c8.tar.xz
Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
The testcase verifies that 'git cvsexportcommit' functions correctly when the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.'). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index a15222ced..7e25a392a 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -2,7 +2,7 @@
#
# Copyright (c) Robin Rosenberg
#
-test_description='CVS export comit. '
+test_description='Test export of commits to CVS'
. ./test-lib.sh
@@ -246,4 +246,20 @@ test_expect_success \
;;
esac
+test_expect_failure '-w option should work with relative GIT_DIR' '
+ mkdir W &&
+ echo foobar >W/file1.txt &&
+ echo bazzle >W/file2.txt &&
+ git add W/file1.txt &&
+ git add W/file2.txt &&
+ git commit -m "More updates" &&
+ id=$(git rev-list --max-count=1 HEAD) &&
+ (cd "$GIT_DIR" &&
+ GIT_DIR=. git cvsexportcommit -w "$CVSWORK" -c $id &&
+ check_entries "$CVSWORK/W" "file1.txt/1.1/|file2.txt/1.1/" &&
+ diff -u "$CVSWORK/W/file1.txt" ../W/file1.txt &&
+ diff -u "$CVSWORK/W/file2.txt" ../W/file2.txt
+ )
+'
+
test_done