From 5cc271ef183401fe0e4d691d2fc9c773d3a61033 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 2 Jun 2019 16:43:15 -0500 Subject: [PATCH] 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 --- test/hg-git.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/hg-git.t b/test/hg-git.t index d105665..b552544 100755 --- a/test/hg-git.t +++ b/test/hg-git.t @@ -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*" &&