cvsserver: Add a few tests for 'status' command
Signed-off-by: Damien Diederen <dash@foobox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Damien Diederen committed
Mar 27, 2008 at 23:18 UTC
dded801a7ba8bb91e73cfea2f37242a2aebbc5db
1 file changed
+32
t/t9400-git-cvsserver-server.sh
+32
@@ -420,4 +420,36 @@ test_expect_success 'cvs update (merge no-op)' \
420
GIT_CONFIG="$git_config" cvs -Q update &&
421
diff -q merge ../merge'
422
423
+#------------
424
+# CVS STATUS
425
+#------------
426
+
427
+cd "$WORKDIR"
428
+test_expect_success 'cvs status' '
429
+ mkdir status.dir &&
430
+ echo Line > status.dir/status.file &&
431
+ echo Line > status.file &&
432
+ git add status.dir status.file &&
433
+ git commit -q -m "Status test" &&
434
+ git push gitcvs.git >/dev/null &&
435
+ cd cvswork &&
436
+ GIT_CONFIG="$git_config" cvs update &&
437
+ GIT_CONFIG="$git_config" cvs status | grep "^File: status.file" >../out &&
438
+ test $(wc -l <../out) = 2
439
+'
440
+
441
+cd "$WORKDIR"
442
+test_expect_success 'cvs status (nonrecursive)' '
443
+ cd cvswork &&
444
+ GIT_CONFIG="$git_config" cvs status -l | grep "^File: status.file" >../out &&
445
+ test $(wc -l <../out) = 1
446
+'
447
+
448
+cd "$WORKDIR"
449
+test_expect_success 'cvs status (no subdirs in header)' '
450
+ cd cvswork &&
451
+ GIT_CONFIG="$git_config" cvs status | grep ^File: >../out &&
452
+ ! grep / <../out
453
+'
454
+
455
test_done