Skip to content

Commit

Permalink
Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Johan Herland authored and Junio C Hamano committed Feb 27, 2008
1 parent 0460fb4 commit 9057f0a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion t/t9200-git-cvsexportcommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Copyright (c) Robin Rosenberg
#
test_description='CVS export comit. '
test_description='Test export of commits to CVS'

. ./test-lib.sh

Expand Down Expand Up @@ -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

0 comments on commit 9057f0a

Please sign in to comment.