@matheusbsbs / matheus-bagliano / commits / 9057f0a62c
Fork 0

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>

Johan Herland committed Feb 13, 2008 at 04:11 UTC 9057f0a62c8681bcff8460fec80747a6aa5b43c8
1 file changed +17 -1
t/t9200-git-cvsexportcommit.sh
+17 -1
@@ -2,7 +2,7 @@
2 #
3 # Copyright (c) Robin Rosenberg
4 #
5 -test_description='CVS export comit. '
5 +test_description='Test export of commits to CVS'
6
7 . ./test-lib.sh
8
@@ -246,4 +246,20 @@ test_expect_success \
246 ;;
247 esac
248
249 +test_expect_failure '-w option should work with relative GIT_DIR' '
250 + mkdir W &&
251 + echo foobar >W/file1.txt &&
252 + echo bazzle >W/file2.txt &&
253 + git add W/file1.txt &&
254 + git add W/file2.txt &&
255 + git commit -m "More updates" &&
256 + id=$(git rev-list --max-count=1 HEAD) &&
257 + (cd "$GIT_DIR" &&
258 + GIT_DIR=. git cvsexportcommit -w "$CVSWORK" -c $id &&
259 + check_entries "$CVSWORK/W" "file1.txt/1.1/|file2.txt/1.1/" &&
260 + diff -u "$CVSWORK/W/file1.txt" ../W/file1.txt &&
261 + diff -u "$CVSWORK/W/file2.txt" ../W/file2.txt
262 + )
263 +'
264 +
265 test_done