completion: refactor __gitcomp related tests
[gitweb.git] / t / lib-cvs.sh
index 648d1619c86bb676faadf62bd831683cb46d6be2..44263ade2533b848220c234441ab67813ca2b0b4 100644 (file)
@@ -3,9 +3,6 @@
 . ./test-lib.sh
 
 unset CVS_SERVER
-# for clean cvsps cache
-HOME=$(pwd)
-export HOME
 
 if ! type cvs >/dev/null 2>&1
 then
@@ -30,6 +27,12 @@ case "$cvsps_version" in
        ;;
 esac
 
+setup_cvs_test_repository () {
+       CVSROOT="$(pwd)/.cvsroot" &&
+       cp -r "$TEST_DIRECTORY/$1/cvsroot" "$CVSROOT" &&
+       export CVSROOT
+}
+
 test_cvs_co () {
        # Usage: test_cvs_co BRANCH_NAME
        rm -rf module-cvs-"$1"