diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-02 11:22:15 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-02 11:22:15 +0400 |
commit | 22e885e6d89a5aadd9ed2f7f36f5ae83cc77de74 (patch) | |
tree | e02286103ffb723631f6420a00188c18a7845e6e /t | |
parent | 860bbd50390956b121f320987c5140b337e1ea3a (diff) | |
parent | c1bc30614ad0a9b63f4f798f0aa71d376a095938 (diff) |
Merge branch 'dd/cvsserver'
* dd/cvsserver:
cvsserver: Use the user part of the email in log and annotate results
cvsserver: Add test for update -p
cvsserver: Implement update -p (print to stdout)
cvsserver: Add a few tests for 'status' command
cvsserver: Do not include status output for subdirectories if -l is passed
cvsserver: Only print the file part of the filename in status header
cvsserver: Respond to the 'editors' and 'watchers' commands
Diffstat (limited to 't')
-rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index b91b151417..166b43f783 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -420,4 +420,54 @@ test_expect_success 'cvs update (merge no-op)' \ GIT_CONFIG="$git_config" cvs -Q update && diff -q merge ../merge' +cd "$WORKDIR" +test_expect_success 'cvs update (-p)' ' + touch really-empty && + echo Line 1 > no-lf && + echo -n Line 2 >> no-lf && + git add really-empty no-lf && + git commit -q -m "Update -p test" && + git push gitcvs.git >/dev/null && + cd cvswork && + GIT_CONFIG="$git_config" cvs update && + rm -f failures && + for i in merge no-lf empty really-empty; do + GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out + diff $i.out ../$i >>failures 2>&1 + done && + test -z "$(cat failures)" +' + +#------------ +# CVS STATUS +#------------ + +cd "$WORKDIR" +test_expect_success 'cvs status' ' + mkdir status.dir && + echo Line > status.dir/status.file && + echo Line > status.file && + git add status.dir status.file && + git commit -q -m "Status test" && + git push gitcvs.git >/dev/null && + cd cvswork && + GIT_CONFIG="$git_config" cvs update && + GIT_CONFIG="$git_config" cvs status | grep "^File: status.file" >../out && + test $(wc -l <../out) = 2 +' + +cd "$WORKDIR" +test_expect_success 'cvs status (nonrecursive)' ' + cd cvswork && + GIT_CONFIG="$git_config" cvs status -l | grep "^File: status.file" >../out && + test $(wc -l <../out) = 1 +' + +cd "$WORKDIR" +test_expect_success 'cvs status (no subdirs in header)' ' + cd cvswork && + GIT_CONFIG="$git_config" cvs status | grep ^File: >../out && + ! grep / <../out +' + test_done |