CVSROOT=$(pwd)/cvsroot
export CVSROOT
+unset CVS_SERVER
# for clean cvsps cache
HOME=$(pwd)
export HOME
cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
case "$cvsps_version" in
-2.1)
+2.1 | 2.2*)
;;
'')
say 'skipping cvsimport tests, cvsps not found'
exit
;;
*)
- say 'skipping cvsimport tests, cvsps too old'
+ say 'skipping cvsimport tests, unsupported cvsps version'
test_done
exit
;;
test_expect_success 'import a trivial module' '
git cvsimport -a -z 0 -C module-git module &&
- git diff module-cvs/o_fortuna module-git/o_fortuna
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
git cvsimport -a -z 0 module &&
git merge origin &&
cd .. &&
- git diff module-cvs/o_fortuna module-git/o_fortuna
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
git cvsimport -a -z0 &&
git merge origin &&
cd .. &&
- git diff module-cvs/tick module-git/tick
+ test_cmp module-cvs/tick module-git/tick
'
git cvsimport -a -z0 &&
echo 1 >expect &&
git log -1 --pretty=format:%s%n >actual &&
- git diff actual expect &&
+ test_cmp actual expect &&
cd ..
'