mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-05-13 00:35:30 +02:00
test: hggit: add simple file rename test
The Hg-Git project has put a lot of emphasis on file renaming, better check for that explicitly, even though we are already testing that. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -125,6 +125,31 @@ setup () {
|
||||
|
||||
setup
|
||||
|
||||
test_expect_success 'rename' '
|
||||
test_when_finished "rm -rf gitrepo* hgrepo*" &&
|
||||
|
||||
(
|
||||
hg init hgrepo1 &&
|
||||
cd hgrepo1 &&
|
||||
echo alpha > alpha &&
|
||||
hg add alpha &&
|
||||
hg commit -m "add alpha" &&
|
||||
hg mv alpha beta &&
|
||||
hg commit -m "rename alpha to beta"
|
||||
) &&
|
||||
|
||||
for x in hg git
|
||||
do
|
||||
git_clone_$x hgrepo1 gitrepo-$x &&
|
||||
hg_clone_$x gitrepo-$x hgrepo2-$x &&
|
||||
hg_log hgrepo2-$x > "hg-log-$x" &&
|
||||
git_log gitrepo-$x > "git-log-$x"
|
||||
done &&
|
||||
|
||||
test_cmp hg-log-hg hg-log-git &&
|
||||
test_cmp git-log-hg git-log-git
|
||||
'
|
||||
|
||||
test_expect_success 'executable bit' '
|
||||
test_when_finished "rm -rf gitrepo* hgrepo*" &&
|
||||
|
||||
|
||||
Reference in New Issue
Block a user