Skip to content

Commit

Permalink
cvsserver: Add a few tests for 'status' command
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Diederen <dash@foobox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Damien Diederen authored and Junio C Hamano committed Mar 27, 2008
1 parent 852b921 commit dded801
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions t/t9400-git-cvsserver-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,36 @@ test_expect_success 'cvs update (merge no-op)' \
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../merge'

#------------
# 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

0 comments on commit dded801

Please sign in to comment.