3 test_description
='git cvsimport basic tests'
9 test_expect_success
'setup cvsroot' '$CVS init'
11 test_expect_success
'setup a cvs module' '
13 mkdir "$CVSROOT/module" &&
14 $CVS co -d module-cvs module &&
16 cat <<EOF >o_fortuna &&
35 add "O Fortuna" lyrics
37 These public domain lyrics make an excellent sample text.
39 $CVS commit -F message &&
43 test_expect_success
'import a trivial module' '
45 git cvsimport -a -z 0 -C module-git module &&
46 test_cmp module-cvs/o_fortuna module-git/o_fortuna
50 test_expect_success
'pack refs' 'cd module-git && git gc && cd ..'
52 test_expect_success
'update cvs module' '
55 cat <<EOF >o_fortuna &&
70 it melts them like ice.
77 $CVS commit -F message &&
81 test_expect_success
'update git module' '
84 git cvsimport -a -z 0 module &&
87 test_cmp module-cvs/o_fortuna module-git/o_fortuna
91 test_expect_success
'update cvs module' '
101 test_expect_success
'cvsimport.module config works' '
104 git config cvsimport.module module &&
105 git cvsimport -a -z0 &&
108 test_cmp module-cvs/tick module-git/tick
112 test_expect_success
'import from a CVS working tree' '
114 $CVS co -d import-from-wt module &&
116 git cvsimport -a -z0 &&
118 git log -1 --pretty=format:%s%n >actual &&
119 test_cmp actual expect &&
124 test_expect_success
'test entire HEAD' 'test_cmp_branch_tree master'