Code

tests: unset COLUMNS inherited from environment
[git.git] / t / lib-cvs.sh
index 4b3b793730604e5b513c5017f39f4560b3083338..44263ade2533b848220c234441ab67813ca2b0b4 100644 (file)
@@ -3,13 +3,10 @@
 . ./test-lib.sh
 
 unset CVS_SERVER
-# for clean cvsps cache
-HOME=$(pwd)
-export HOME
 
 if ! type cvs >/dev/null 2>&1
 then
-       say 'skipping cvsimport tests, cvs not found'
+       skip_all='skipping cvsimport tests, cvs not found'
        test_done
 fi
 
@@ -21,15 +18,21 @@ case "$cvsps_version" in
 2.1 | 2.2*)
        ;;
 '')
-       say 'skipping cvsimport tests, cvsps not found'
+       skip_all='skipping cvsimport tests, cvsps not found'
        test_done
        ;;
 *)
-       say 'skipping cvsimport tests, unsupported cvsps version'
+       skip_all='skipping cvsimport tests, unsupported cvsps version'
        test_done
        ;;
 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"