From c40fcefddec1d07fb5a06c2173b409f37f7409d1 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Mon, 11 Feb 2019 21:13:44 +0100 Subject: Remove Unicode normalization in difftree Fixes #1057 Signed-off-by: Vadim Markovtsev --- utils/merkletrie/difftree_test.go | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'utils/merkletrie/difftree_test.go') diff --git a/utils/merkletrie/difftree_test.go b/utils/merkletrie/difftree_test.go index ab0eb57..ac86145 100644 --- a/utils/merkletrie/difftree_test.go +++ b/utils/merkletrie/difftree_test.go @@ -475,8 +475,29 @@ func (s *DiffTreeSuite) TestIssue275(c *C) { }) } +func (s *DiffTreeSuite) TestIssue1057(c *C) { + p1 := "TestAppWithUnicodéPath" + p2 := "TestAppWithUnicodéPath" + c.Assert(p1 == p2, Equals, false) + do(c, []diffTreeTest{ + { + fmt.Sprintf("(%s(x.go<1>))", p1), + fmt.Sprintf("(%s(x.go<1>) %s(x.go<1>))", p1, p2), + fmt.Sprintf("+%s/x.go", p2), + }, + }) + // swap p1 with p2 + do(c, []diffTreeTest{ + { + fmt.Sprintf("(%s(x.go<1>))", p2), + fmt.Sprintf("(%s(x.go<1>) %s(x.go<1>))", p1, p2), + fmt.Sprintf("+%s/x.go", p1), + }, + }) +} + func (s *DiffTreeSuite) TestCancel(c *C) { - t := diffTreeTest{"()", "(a<> b<1> c() d<> e<2> f())", "+a +b +d +e"} + t := diffTreeTest{"()", "(a<> b<1> c() d<> e<2> f())", "+a +b +d +e"} comment := Commentf("\n%s", "test cancel:") a, err := fsnoder.New(t.from) -- cgit