From c7dbb5612b6db5d4f0cc3c8a796b225836223c3f Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Tue, 4 Jun 2019 14:19:28 -0500 Subject: [PATCH] Add timezone bidirectionality test Oliver Stueker pointed out correctly that there is an issue with the way we handle negative timestamps that don't have a full hour offset. This test shows that. Signed-off-by: Felipe Contreras --- test/bidi.t | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/bidi.t b/test/bidi.t index 08e1cc3..1c41fea 100755 --- a/test/bidi.t +++ b/test/bidi.t @@ -240,4 +240,42 @@ test_expect_success 'hg tags' ' test_cmp expected actual ' +test_expect_failure 'test timezones' ' + test_when_finished "rm -rf gitrepo* hgrepo*" && + + ( + git init -q gitrepo && + cd gitrepo && + + echo alpha > alpha && + git add alpha && + git commit -m "add alpha" --date="2007-01-01 00:00:00 +0000" && + + echo beta > beta && + git add beta && + git commit -m "add beta" --date="2007-01-01 00:00:00 +0100" && + + echo gamma > gamma && + git add gamma && + git commit -m "add gamma" --date="2007-01-01 00:00:00 -0100" && + + echo delta > delta && + git add delta && + git commit -m "add delta" --date="2007-01-01 00:00:00 +0130" && + + echo epsilon > epsilon && + git add epsilon && + git commit -m "add epsilon" --date="2007-01-01 00:00:00 -0130" + ) && + + hg_clone gitrepo hgrepo && + git_clone hgrepo gitrepo2 && + hg_clone gitrepo2 hgrepo2 && + + hg_log hgrepo > expected && + hg_log hgrepo2 > actual && + + test_cmp expected actual +' + test_done